comparison tests/test-glog-topological.t @ 23565:996c01bfbec4

graphlog: add a way to test the 'groupbranchiter' function We add an experimental config option to use the topological sorting. I first tried to hook the 'groupbranchiter' function in the 'sort' revset but this was useless because graphlog enforces revision number sorting :( As the goal is to advance on the topological iteration logic, I see this experimental option as a good way to move forward. We have to use turn the iterator into a list because the graphlog is apparently not ready for pure iterator input yet.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 14 Nov 2014 17:37:59 +0000
parents
children 1f080c9c6a35
comparison
equal deleted inserted replaced
23564:f7ce0837eefd 23565:996c01bfbec4
1 This test file aims at test topological iteration and the various configuration it can has.
2
3 $ cat >> $HGRCPATH << EOF
4 > [ui]
5 > logtemplate={rev}\n
6 > EOF
7
8 On this simple example, all topological branch are displayed in turn until we
9 can finally display 0. this implies skipping from 8 to 3 and coming back to 7
10 later.
11
12 $ hg init test01
13 $ cd test01
14 $ hg unbundle $TESTDIR/bundles/remote.hg
15 adding changesets
16 adding manifests
17 adding file changes
18 added 9 changesets with 7 changes to 4 files (+1 heads)
19 (run 'hg heads' to see heads, 'hg merge' to merge)
20
21 $ hg log -G
22 o 8
23 |
24 | o 7
25 | |
26 | o 6
27 | |
28 | o 5
29 | |
30 | o 4
31 | |
32 o | 3
33 | |
34 o | 2
35 | |
36 o | 1
37 |/
38 o 0
39
40 $ hg --config experimental.graph-topological=1 log -G
41 o 8
42 |
43 o 3
44 |
45 o 2
46 |
47 o 1
48 |
49 | o 7
50 | |
51 | o 6
52 | |
53 | o 5
54 | |
55 | o 4
56 |/
57 o 0
58