changeset 34562:c2d2e18f9700

mq: use the newcommitphase utility We use the official API instead of doing the operation manually. This will help storing the default value for phases properly in the next changeset.
author Boris Feld <boris.feld@octobus.net>
date Mon, 09 Oct 2017 17:33:03 +0200
parents fe6125ebdf91
children 1faa34347b24
files hgext/mq.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Tue Sep 26 18:17:47 2017 +0200
+++ b/hgext/mq.py	Mon Oct 09 17:33:03 2017 +0200
@@ -1065,7 +1065,7 @@
         if qfinished and repo.ui.configbool('mq', 'secret'):
             # only use this logic when the secret option is added
             oldqbase = repo[qfinished[0]]
-            tphase = repo.ui.config('phases', 'new-commit', phases.draft)
+            tphase = phases.newcommitphase(repo.ui)
             if oldqbase.phase() > tphase and oldqbase.p1().phase() <= tphase:
                 with repo.transaction('qfinish') as tr:
                     phases.advanceboundary(repo, tr, tphase, qfinished)