hgext/mq.py
branchstable
changeset 16029 ee1c8385e5b0
parent 16028 922c0e9b40be
child 16040 c0b2986b37b8
--- a/hgext/mq.py	Mon Jan 30 17:39:05 2012 +0100
+++ b/hgext/mq.py	Mon Jan 30 15:17:08 2012 +0100
@@ -826,9 +826,13 @@
         return patches
 
     def finish(self, repo, revs):
+        # Manually trigger phase computation to ensure phasedefaults is
+        # executed before we remove the patches.
+        repo._phaserev
         patches = self._revpatches(repo, sorted(revs))
         qfinished = self._cleanup(patches, len(patches))
-        if qfinished:
+        if qfinished and repo.ui.configbool('mq', 'secret', False):
+            # only use this logic when the secret option is added
             oldqbase = repo[qfinished[0]]
             if oldqbase.p1().phase() < phases.secret:
                 phases.advanceboundary(repo, phases.draft, qfinished)