# HG changeset patch # User Boris Feld # Date 2017-10-09 15:33:03 # Node ID c2d2e18f97004a81b08b22d6e9961f3714d7693a # Parent fe6125ebdf91f5e7a5d4a3e772700faeb4511051 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. diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1065,7 +1065,7 @@ class queue(object): 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)