How can histedit be used to "reorder" changesets?

Benjamin Fritz fritzophrenic at gmail.com
Mon Sep 7 18:48:19 UTC 2015


I'm creating a new repository for a subset of a larger repository, and am
cleaning up some of the history while I'm at it.

The wiki for EditingHistory (
https://mercurial.selenic.com/wiki/EditingHistory) says "To easily reorder,
accept, fold or reject changesets there's also the HisteditExtension".

The wiki for Histedit (
https://mercurial.selenic.com/wiki/HisteditExtension)says "History
rewriting works by reordering changesets so that they reflect a new
ordering in the history graph" and "All changesets from that revision and
onwards are selected for history reordering and modification".

I understand "reorder" to mean "change the parents of a changset" or "swap
the parent-child relationship of a pair of changesets" or similar. But, the
operations available for histedit (pick, fold, edit, drop, mess) only
*edit* a changeset; order is always left intact, although you can combine
multiple changesets or split one changeset into several. I do not see any
way to change the ordering of existing changesets.

Have I misunderstood what "reorder" means, or am I missing some way to use
histedit for this task?

Currently I'm using "hg convert" with the "--splicemap" option to rearrage
changesets (and create merges where none existed before), but that seems
like a very heavy-weight tool. It's irrelevant to my current task, but I
also know "hg convert" probably cannot take advantage of changeset
obsolescence either.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20150907/6eb63cda/attachment.html>


More information about the Mercurial mailing list