Search code examples
mercurialtortoisehg

Is it possible to manually change/reorder the revision numbers (provided topology remains the same)?


In Mercurial , revision numbers are local-clone specific, and they are provided as a facility to point to a specific changeset in a more user-friendly way than a changeset id.

However when displaying the timeline graph, TortoiseHG will order by revision number. If some guy pushes commits not that often, you'll get all his commits at once with adjacent revision numbers, and it will mess up the whole point of the graph.

enter image description here

This graph would be more insightful: there are two lines of development, with two authors, one merging the work of the other one:

enter image description here

Therefore, is it possible to manually reorder the revision numbers (as long as the topological order of changesets is still compatible with the new numbers?

Thanks.


Solution

  • It is possible to reorder your repository (that's what contrib/shrink-revlog.py does). But in this case it seems overkill and complicated.

    Since this is mostly a display issue, you should instead ask THG to implement the reordering you would like to have. I admittedly have no idea what you find messed up in the graph above.