2014-11-14 20:37:59 +03:00
|
|
|
This test file aims at test topological iteration and the various configuration it can has.
|
|
|
|
|
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [ui]
|
|
|
|
> logtemplate={rev}\n
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
On this simple example, all topological branch are displayed in turn until we
|
|
|
|
can finally display 0. this implies skipping from 8 to 3 and coming back to 7
|
|
|
|
later.
|
|
|
|
|
|
|
|
$ hg init test01
|
|
|
|
$ cd test01
|
|
|
|
$ hg unbundle $TESTDIR/bundles/remote.hg
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 9 changesets with 7 changes to 4 files (+1 heads)
|
|
|
|
(run 'hg heads' to see heads, 'hg merge' to merge)
|
|
|
|
|
|
|
|
$ hg log -G
|
|
|
|
o 8
|
|
|
|
|
|
|
|
|
| o 7
|
|
|
|
| |
|
|
|
|
| o 6
|
|
|
|
| |
|
|
|
|
| o 5
|
|
|
|
| |
|
|
|
|
| o 4
|
|
|
|
| |
|
|
|
|
o | 3
|
|
|
|
| |
|
|
|
|
o | 2
|
|
|
|
| |
|
|
|
|
o | 1
|
|
|
|
|/
|
|
|
|
o 0
|
|
|
|
|
2014-09-04 21:05:36 +04:00
|
|
|
|
|
|
|
(display all nodes)
|
|
|
|
|
2016-06-13 20:20:00 +03:00
|
|
|
$ hg log -G -r 'sort(all(), topo)'
|
2014-11-14 20:37:59 +03:00
|
|
|
o 8
|
|
|
|
|
|
|
|
|
o 3
|
|
|
|
|
|
|
|
|
o 2
|
|
|
|
|
|
|
|
|
o 1
|
|
|
|
|
|
|
|
|
| o 7
|
|
|
|
| |
|
|
|
|
| o 6
|
|
|
|
| |
|
|
|
|
| o 5
|
|
|
|
| |
|
|
|
|
| o 4
|
|
|
|
|/
|
|
|
|
o 0
|
|
|
|
|
2014-09-04 21:05:36 +04:00
|
|
|
|
2016-09-22 14:53:53 +03:00
|
|
|
(display nodes filtered by log options)
|
|
|
|
|
|
|
|
$ hg log -G -r 'sort(all(), topo)' -k '.3'
|
|
|
|
o 8
|
|
|
|
|
|
|
|
|
o 3
|
|
|
|
|
|
|
|
|
~
|
|
|
|
o 7
|
|
|
|
|
|
|
|
|
o 6
|
|
|
|
|
|
|
|
|
~
|
|
|
|
|
2014-09-04 21:05:36 +04:00
|
|
|
(revset skipping nodes)
|
|
|
|
|
2016-06-13 20:20:00 +03:00
|
|
|
$ hg log -G --rev 'sort(not (2+6), topo)'
|
2014-09-04 21:05:36 +04:00
|
|
|
o 8
|
|
|
|
|
|
|
|
|
o 3
|
2016-03-23 23:34:47 +03:00
|
|
|
:
|
2014-09-04 21:05:36 +04:00
|
|
|
o 1
|
|
|
|
|
|
|
|
|
| o 7
|
2016-03-23 23:34:47 +03:00
|
|
|
| :
|
2014-09-04 21:05:36 +04:00
|
|
|
| o 5
|
|
|
|
| |
|
|
|
|
| o 4
|
|
|
|
|/
|
|
|
|
o 0
|
|
|
|
|
|
|
|
|
2014-09-04 21:28:17 +04:00
|
|
|
(begin) from the other branch
|
|
|
|
|
2016-06-13 20:20:00 +03:00
|
|
|
$ hg log -G -r 'sort(all(), topo, topo.firstbranch=5)'
|
2014-09-04 21:28:17 +04:00
|
|
|
o 7
|
|
|
|
|
|
|
|
|
o 6
|
|
|
|
|
|
|
|
|
o 5
|
|
|
|
|
|
|
|
|
o 4
|
|
|
|
|
|
|
|
|
| o 8
|
|
|
|
| |
|
|
|
|
| o 3
|
|
|
|
| |
|
|
|
|
| o 2
|
|
|
|
| |
|
|
|
|
| o 1
|
|
|
|
|/
|
|
|
|
o 0
|
|
|
|
|