changeset 10680:45eb9b5dacf6

mq: simplify qparents calculation
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 14 Mar 2010 01:01:17 +0100
parents 35abaea778dc
children 3f6a6407a3c7
files hgext/mq.py
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Sun Mar 14 00:53:55 2010 +0100
+++ b/hgext/mq.py	Sun Mar 14 01:01:17 2010 +0100
@@ -552,12 +552,8 @@
                 return None
             return self.applied[-1].node
         p1, p2 = repo.changelog.parents(rev)
-        if p2 != nullid:
-            arevs = [x.node for x in self.applied]
-            if p1 in arevs:
-                return p1
-            if p2 in arevs:
-                return p2
+        if p2 != nullid and p2 in [x.node for x in self.applied]:
+            return p2
         return p1
 
     def mergepatch(self, repo, mergeq, series, diffopts):