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.
--- 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)