##// END OF EJS Templates
qfinish: comply with the phases.new-commit option in secret mode (issue3335)...
Pierre-Yves David -
r16290:9518cb55 stable
parent child Browse files
Show More
@@ -843,8 +843,9 b' class queue(object):'
843 843 if qfinished and repo.ui.configbool('mq', 'secret', False):
844 844 # only use this logic when the secret option is added
845 845 oldqbase = repo[qfinished[0]]
846 if oldqbase.p1().phase() < phases.secret:
847 phases.advanceboundary(repo, phases.draft, qfinished)
846 tphase = repo.ui.config('phases', 'new-commit', phases.draft)
847 if oldqbase.phase() > tphase and oldqbase.p1().phase() <= tphase:
848 phases.advanceboundary(repo, tphase, qfinished)
848 849
849 850 def delete(self, repo, patches, opts):
850 851 if not patches and not opts.get('rev'):
@@ -1474,6 +1474,22 b' Test that qfinish change phase when mq.s'
1474 1474 1: secret
1475 1475 2: secret
1476 1476
1477 Test that qfinish respect phases.new-commit setting
1478
1479 $ echo '[phases]' >> $HGRCPATH
1480 $ echo 'new-commit=secret' >> $HGRCPATH
1481 $ hg qfinish qbase
1482 patch add-file2 finalized without changeset message
1483 $ hg phase 'all()'
1484 0: draft
1485 1: secret
1486 2: secret
1487
1488 (restore env for next test)
1489
1490 $ sed -i.bak -e 's/new-commit=secret//' $HGRCPATH
1491 $ hg qimport -r 1 --name add-file2
1492
1477 1493 Test that qfinish preserve phase when mq.secret=false
1478 1494
1479 1495 $ sed -i.bak -e 's/secret=true/secret=false/' $HGRCPATH
General Comments 0
You need to be logged in to leave comments. Login now