changeset 41373:b5f5dc0fa908

mq: slightly simplify check for patched working copy Differential Revision: https://phab.mercurial-scm.org/D5693
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 24 Jan 2019 16:30:30 -0800
parents 390ef056081b
children d75fde22de91
files hgext/mq.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Thu Jan 24 16:25:19 2019 -0800
+++ b/hgext/mq.py	Thu Jan 24 16:30:30 2019 -0800
@@ -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,