Show More
@@ -171,7 +171,8 b' def showbookmarks(ui, repo, fm):' | |||||
171 | fm.write('bookmark', '%s', bm) |
|
171 | fm.write('bookmark', '%s', bm) | |
172 | fm.write('node', fm.hexfunc(node), fm.hexfunc(node)) |
|
172 | fm.write('node', fm.hexfunc(node), fm.hexfunc(node)) | |
173 | fm.data(active=bm == active, |
|
173 | fm.data(active=bm == active, | |
174 |
longestbookmarklen=longestname |
|
174 | longestbookmarklen=longestname, | |
|
175 | nodelen=5) | |||
175 |
|
176 | |||
176 | @showview('stack', csettopic='stack') |
|
177 | @showview('stack', csettopic='stack') | |
177 | def showstack(ui, repo, displayer): |
|
178 | def showstack(ui, repo, displayer): | |
@@ -277,7 +278,7 b' def showstack(ui, repo, displayer):' | |||||
277 | ui.write(' ') |
|
278 | ui.write(' ') | |
278 |
|
279 | |||
279 | ui.write(('o ')) |
|
280 | ui.write(('o ')) | |
280 | displayer.show(ctx) |
|
281 | displayer.show(ctx, nodelen=5) | |
281 | displayer.flush(ctx) |
|
282 | displayer.flush(ctx) | |
282 | ui.write('\n') |
|
283 | ui.write('\n') | |
283 |
|
284 | |||
@@ -317,7 +318,7 b' def showstack(ui, repo, displayer):' | |||||
317 | ui.write(' ') |
|
318 | ui.write(' ') | |
318 |
|
319 | |||
319 | ui.write(symbol, ' ') |
|
320 | ui.write(symbol, ' ') | |
320 | displayer.show(ctx) |
|
321 | displayer.show(ctx, nodelen=5) | |
321 | displayer.flush(ctx) |
|
322 | displayer.flush(ctx) | |
322 | ui.write('\n') |
|
323 | ui.write('\n') | |
323 |
|
324 | |||
@@ -334,7 +335,7 b' def showstack(ui, repo, displayer):' | |||||
334 | ui.write(_('(stack base)'), '\n', label='stack.label') |
|
335 | ui.write(_('(stack base)'), '\n', label='stack.label') | |
335 | ui.write(('o ')) |
|
336 | ui.write(('o ')) | |
336 |
|
337 | |||
337 | displayer.show(basectx) |
|
338 | displayer.show(basectx, nodelen=5) | |
338 | displayer.flush(basectx) |
|
339 | displayer.flush(basectx) | |
339 | ui.write('\n') |
|
340 | ui.write('\n') | |
340 |
|
341 | |||
@@ -397,7 +398,8 b' def showwork(ui, repo, displayer):' | |||||
397 | revdag = graphmod.dagwalker(repo, revs) |
|
398 | revdag = graphmod.dagwalker(repo, revs) | |
398 |
|
399 | |||
399 | ui.setconfig('experimental', 'graphshorten', True) |
|
400 | ui.setconfig('experimental', 'graphshorten', True) | |
400 |
cmdutil.displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges |
|
401 | cmdutil.displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges, | |
|
402 | props={'nodelen': 5}) | |||
401 |
|
403 | |||
402 | def extsetup(ui): |
|
404 | def extsetup(ui): | |
403 | # Alias `hg <prefix><view>` to `hg show <view>`. |
|
405 | # Alias `hg <prefix><view>` to `hg show <view>`. |
@@ -3,12 +3,12 b'' | |||||
3 | # piggyback on existing values so color works. |
|
3 | # piggyback on existing values so color works. | |
4 | # * Obsolescence isn't considered for node labels. See _cset_labels in |
|
4 | # * Obsolescence isn't considered for node labels. See _cset_labels in | |
5 | # map-cmdline.default. |
|
5 | # map-cmdline.default. | |
6 |
showbookmarks = '{if(active, "*", " ")} {pad(bookmark, longestbookmarklen + 4)}{shortest(node, |
|
6 | showbookmarks = '{if(active, "*", " ")} {pad(bookmark, longestbookmarklen + 4)}{shortest(node, nodelen)}\n' | |
7 |
|
7 | |||
8 | showwork = '{cset_shortnode}{namespaces % cset_namespace} {cset_shortdesc}' |
|
8 | showwork = '{cset_shortnode}{namespaces % cset_namespace} {cset_shortdesc}' | |
9 | showstack = '{showwork}' |
|
9 | showstack = '{showwork}' | |
10 |
|
10 | |||
11 |
cset_shortnode = '{label("log.changeset changeset.{phase}", shortest(node, |
|
11 | cset_shortnode = '{label("log.changeset changeset.{phase}", shortest(node, nodelen))}' | |
12 |
|
12 | |||
13 | # Treat branch and tags specially so we don't display "default" or "tip" |
|
13 | # Treat branch and tags specially so we don't display "default" or "tip" | |
14 | cset_namespace = '{ifeq(namespace, "branches", names_branches, ifeq(namespace, "tags", names_tags, names_others))}' |
|
14 | cset_namespace = '{ifeq(namespace, "branches", names_branches, ifeq(namespace, "tags", names_tags, names_others))}' |
@@ -112,13 +112,15 b' bookmarks JSON works' | |||||
112 | "active": true, |
|
112 | "active": true, | |
113 | "bookmark": "a-longer-bookmark", |
|
113 | "bookmark": "a-longer-bookmark", | |
114 | "longestbookmarklen": 17, |
|
114 | "longestbookmarklen": 17, | |
115 | "node": "7b5709ab64cbc34da9b4367b64afff47f2c4ee83" |
|
115 | "node": "7b5709ab64cbc34da9b4367b64afff47f2c4ee83", | |
|
116 | "nodelen": 5 | |||
116 | }, |
|
117 | }, | |
117 | { |
|
118 | { | |
118 | "active": false, |
|
119 | "active": false, | |
119 | "bookmark": "book1", |
|
120 | "bookmark": "book1", | |
120 | "longestbookmarklen": 17, |
|
121 | "longestbookmarklen": 17, | |
121 | "node": "b757f780b8ffd71267c6ccb32e0882d9d32a8cc0" |
|
122 | "node": "b757f780b8ffd71267c6ccb32e0882d9d32a8cc0", | |
|
123 | "nodelen": 5 | |||
122 | } |
|
124 | } | |
123 | ] |
|
125 | ] | |
124 |
|
126 |
General Comments 0
You need to be logged in to leave comments.
Login now