D5693: mq: slightly simplify check for patched working copy
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Jan 25 20:05:27 UTC 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3cd34838927a: mq: slightly simplify check for patched working copy (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5693?vs=13439&id=13461
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