changeset 18343:cfa731b45b75

mq: checktoppatch should only check if p1 is qtip There is no way qtip in p2 could be used for anything, and there is thus no reason to check and accept it.
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 15 Jan 2013 01:05:12 +0100
parents de99de39ba28
children 87923db0ecff
files hgext/mq.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Tue Jan 15 01:05:12 2013 +0100
+++ b/hgext/mq.py	Tue Jan 15 01:05:12 2013 +0100
@@ -929,11 +929,11 @@
         self._cleanup(realpatches, numrevs, opts.get('keep'))
 
     def checktoppatch(self, repo):
+        '''check that working directory is at qtip'''
         if self.applied:
             top = self.applied[-1].node
             patch = self.applied[-1].name
-            pp = repo.dirstate.parents()
-            if top not in pp:
+            if repo.dirstate.p1() != top:
                 raise util.Abort(_("working directory revision is not qtip"))
             return top, patch
         return None, None