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.
The current test does not rewrite anything and therefor does not create any
instability.
We also clean up the repo state after the test. This required the rebase
extension.
Have histedit record the hex of the original changeset as already done by:
- graft
- commit --amend
- rebase
My main motivation for adding this is to prevent the creation of obsolescence cycle
(see issue3681).
Note that commit created during edit are not affected yet.
The `ui.prevent-unstable` option never made it into core. It always behaves
this way when obsolescence feature is enabled.
See changesets caaf2a66c719, f111507ae88a and 51dfebaadebc for details.
Obsolescence markers can represent this situation just fine. Rewritten
revisions are marked as precursors of the ones creates by
histedit. Unaffected descendants become "unstable".
If obsolescence is not enabled we keep the current behavior of
aborting. This new behavior only applies when obsolete is
enabled and is subject to future discussion and changes.
We do not want hidden revision to block histedit. They are already "dead"
and we do not care about dead orphans. see similar changeset 40db49347807 for
rebase.
When the obsolete feature is enabled, histedit creates obsolescence marker
instead of stripping replaced changesets.
For now, we keep stripping temporary nodes created along the way.