Show More
@@ -0,0 +1,58 b'' | |||||
|
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 |
@@ -199,6 +199,9 b' def dagwalker(repo, revs):' | |||||
199 | lowestrev = revs.min() |
|
199 | lowestrev = revs.min() | |
200 | gpcache = {} |
|
200 | gpcache = {} | |
201 |
|
201 | |||
|
202 | if repo.ui.configbool('experimental', 'graph-topological', False): | |||
|
203 | revs = list(groupbranchiter(revs, repo.changelog.parentrevs)) | |||
|
204 | ||||
202 | for rev in revs: |
|
205 | for rev in revs: | |
203 | ctx = repo[rev] |
|
206 | ctx = repo[rev] | |
204 | parents = sorted(set([p.rev() for p in ctx.parents() |
|
207 | parents = sorted(set([p.rev() for p in ctx.parents() |
General Comments 0
You need to be logged in to leave comments.
Login now