Mercurial > public > mercurial-scm > hg-stable
diff hgext/mq.py @ 16290:9518cb55c822 stable
qfinish: comply with the phases.new-commit option in secret mode (issue3335)
In secret mode qfinished changeset were move to the draft phase in all case[1]
without regard to phases.new-commit value
This changeset ensure qfinish does not automatically promote a changeset
further than the phases.new-commit value.
Note: This may also result in qfinished changeset made public if
phases.new-commit is set to public.
[1] "In all case" where parent have a compatible phase. Qfinish keep never
altering phases of changeset not involved in the qfinish.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sat, 24 Mar 2012 12:06:49 +0100 |
parents | 900eee0778d1 |
children | 9952ac7e0968 7ee8aa662937 |
line wrap: on
line diff
--- a/hgext/mq.py Wed Mar 21 22:16:12 2012 -0400 +++ b/hgext/mq.py Sat Mar 24 12:06:49 2012 +0100 @@ -843,8 +843,9 @@ 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) + tphase = repo.ui.config('phases', 'new-commit', phases.draft) + if oldqbase.phase() > tphase and oldqbase.p1().phase() <= tphase: + phases.advanceboundary(repo, tphase, qfinished) def delete(self, repo, patches, opts): if not patches and not opts.get('rev'):