Hi, histedit seems to change the phase of rewritten changesets, including promoting secret changesets to draft: # commit some changesets in draft $ hg phase --secret --force tip $ hg phase tip N: secret $ hg histedit -r somewhere_in_the_past # reorder two commits before tip (not necessarily tip itself) $ hg phase tip N: draft # expected: N: secret I assume future changesets will inherit tip's new phase as well, marking the rest of the branch as draft (and leaking into the upstream repository) unless the user remembers to phase tip back into secret.
I'm not convinced that's a bug - histedit is making new commits, and honoring your default phase setting for new commits.
This is a bug, histedit should prevent the phase of part of history it rewrite. Draft changeset should stay draft even if new-commit option is set to secret. secret changeset should stay secret. In case of reordering or folding, the highest phase win (default < secret)
Seems likely you'll do this before me.
Fixed by http://selenic.com/repo/hg/rev/c6e3fa134da5 Pierre-Yves David <pierre-yves.david@logilab.fr> test-histedit: reorder phases test and prepare for more We are going to add a lot regarding phase of test while fixing issue3724. This movement allows to put them after this first phase test. (please test the fix)
Fixed by http://selenic.com/repo/hg/rev/35513c59f376 Pierre-Yves David <pierre-yves.david@logilab.fr> histedit: proper phase conservation (issue3724) Before this changeset, histedit created all new changesets according phases.new-commit option without any regards for the phases of the original changesets. This changeset fix that using the phase of rewritten changeset to decide the phase of the resulting changeset. In case of reordering or folding, we keep secret item secret as it seems the safer path. temporary commit creation are not affected. They are head only and stripped at the end of the histedit. As for the resolution of issue3681 (obsolescence cycle prevention), we do not handle changesets created by edit command. (please test the fix)
OK, this works fine in 2.5-rc now. Thanks for the fix!