##// END OF EJS Templates
log: add config for making `hg log -G` always topo-sorted...
Martin von Zweigbergk -
r42500:604c086d default
parent child Browse files
Show More
@@ -529,6 +529,9 b" coreconfigitem('experimental', 'evolutio"
529 coreconfigitem('experimental', 'evolution.bundle-obsmarker',
529 coreconfigitem('experimental', 'evolution.bundle-obsmarker',
530 default=False,
530 default=False,
531 )
531 )
532 coreconfigitem('experimental', 'log.topo',
533 default=False,
534 )
532 coreconfigitem('experimental', 'evolution.report-instabilities',
535 coreconfigitem('experimental', 'evolution.report-instabilities',
533 default=True,
536 default=True,
534 )
537 )
@@ -746,7 +746,12 b' def getrevs(repo, pats, opts):'
746 if opts.get('graph'):
746 if opts.get('graph'):
747 # User-specified revs might be unsorted, but don't sort before
747 # User-specified revs might be unsorted, but don't sort before
748 # _makerevset because it might depend on the order of revs
748 # _makerevset because it might depend on the order of revs
749 if not (revs.isdescending() or revs.istopo()):
749 if repo.ui.configbool('experimental', 'log.topo'):
750 if not revs.istopo():
751 revs = dagop.toposort(revs, repo.changelog.parentrevs)
752 # TODO: try to iterate the set lazily
753 revs = revset.baseset(list(revs))
754 elif not (revs.isdescending() or revs.istopo()):
750 revs.sort(reverse=True)
755 revs.sort(reverse=True)
751 if expr:
756 if expr:
752 matcher = revset.match(None, expr)
757 matcher = revset.match(None, expr)
@@ -3,6 +3,16 b''
3 * New config `commands.commit.post-status` shows status after successful
3 * New config `commands.commit.post-status` shows status after successful
4 commit.
4 commit.
5
5
6
7 == New Experimental Features ==
8
9 * New config `experimental.log.topo` makes `hg log -G` use
10 topological sorting. This is especially useful for aliases since it
11 lets the alias accept an `-r` option while still using topological
12 sorting with or without the `-r` (unlike if you use the `sort(...,
13 topo)` revset).
14
15
6 == Bug Fixes ==
16 == Bug Fixes ==
7
17
8
18
@@ -114,3 +114,41 b' later.'
114 |/
114 |/
115 o 0
115 o 0
116
116
117
118 Topological sort can be turned on via config
119
120 $ cat >> $HGRCPATH << EOF
121 > [experimental]
122 > log.topo=true
123 > EOF
124
125 $ hg log -G
126 o 8
127 |
128 o 3
129 |
130 o 2
131 |
132 o 1
133 |
134 | o 7
135 | |
136 | o 6
137 | |
138 | o 5
139 | |
140 | o 4
141 |/
142 o 0
143
144 Does not affect non-graph log
145 $ hg log -T '{rev}\n'
146 8
147 7
148 6
149 5
150 4
151 3
152 2
153 1
154 0
General Comments 0
You need to be logged in to leave comments. Login now