diff hgext/mq.py @ 13520:9510ddf87c43 stable

mq: forbid commit of merge involving mq patches
author Martin Geisler <mg@aragost.com>
date Wed, 02 Mar 2011 14:09:06 +0100
parents 0396ca8015be
children 73bf872a91d8 33a33f19aad2
line wrap: on
line diff
--- a/hgext/mq.py	Tue Mar 01 16:01:38 2011 -0600
+++ b/hgext/mq.py	Wed Mar 02 14:09:06 2011 +0100
@@ -2921,8 +2921,9 @@
 
         def abort_if_wdir_patched(self, errmsg, force=False):
             if self.mq.applied and not force:
-                parent = self.dirstate.parents()[0]
-                if parent in [s.node for s in self.mq.applied]:
+                parents = self.dirstate.parents()
+                patches = [s.node for s in self.mq.applied]
+                if parents[0] in patches or parents[1] in patches:
                     raise util.Abort(errmsg)
 
         def commit(self, text="", user=None, date=None, match=None,