HomePhabricator

revset: add new topographical sort

Description

revset: add new topographical sort

Sort revisions in reverse revision order but grouped by topographical branches.
Visualised as a graph, instead of:

o  4
|
| o  3
| |
| o  2
| |
o |  1
|/
o  0

revisions on a 'main' branch are emitted before 'side' branches:

o  4
|
o  1
|
| o  3
| |
| o  2
|/
o  0

where what constitutes a 'main' branch is configurable, so the sort could also
result in:

o  3
|
o  2
|
| o  4
| |
| o  1
|/
o  0

This sort was already available as an experimental option in the graphmod
module, from which it is now removed.

This sort is best used with hg log -G:

$ hg log -G "sort(all(), topo)"

Details

Committed
Martijn Pieters <mjpieters@fb.com>Jun 13 2016, 1:20 PM
Parents
rHG98535ad46fc0: revset: move groupbranchiter over from graphmod
Branches
Unknown
Tags
Unknown