D5693: mq: slightly simplify check for patched working copy
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Jan 25 00:47:40 UTC 2019
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5693
AFFECTED FILES
hgext/mq.py
CHANGE DETAILS
diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -3521,7 +3521,7 @@
if self.mq.applied and self.mq.checkapplied and not force:
parents = self.dirstate.parents()
patches = [s.node for s in self.mq.applied]
- if parents[0] in patches or parents[1] in patches:
+ if any(p in patches for p in parents):
raise error.Abort(errmsg)
def commit(self, text="", user=None, date=None, match=None,
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list