In Mercurial changesets with a successor are marked obsolete.
Can this marker be (forcefully) removed somehow?
After using hg strip
to remove the successor, the original changeset is still marked as obsolete and extinct). hg evolve
refuses to re-create the successor.
Once the commits are in draft, run the hg histedit rev-id command, specifying the earliest draft commit. This will open the history edit function in your terminal, allowing you to fold the commit messages into one. Select a commit to use as the one into which the others will be squashed.
A changeset (sometimes abbreviated "cset") is an atomic collection of changes to files in a repository. It contains all recorded local modification that lead to a new revision of the repository. A changeset is identified uniquely by a changeset ID. In a single repository, you can identify it using a revision number.
You can't unmark a change as obsolete, but you can bring it back to life using "hg touch <rev> --hidden
", where touch is a new command that is part of the evolve extension.
FWIW. It's also possible to rebase the obsolete change, but you'll probably get fewer complications if you use touch.
Yes! you can remove obsolescence markers now. Perhaps it wasn't possible in 2015, when the question was asked.
The solution is in the Apr 18, 2018 answer from user377178: hg --hidden debugobsolete --delete <revindex>
Note that you do not use a changeset ID. You must use an index number (at least, with Mercurial 4.1.3). Run hg --hidden debugobsolete --index
to get a list of changesets with obsolescence markers. Find the index of the changeset that you want to become non-obsolete, then run hg --hidden debugobsolete --delete <revindex>
with the index substituted for revindex. Then your obsolete changeset is no longer obsolete. (It might be in the list multiple times--I have not thoroughly investigated.)
The debugobsolete command is currently not listed in the evolve user guide, even in the section on recovering obsolete changesets. However, it is listed in the Evolve How To guide.
Many thanks to user377178.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With