Show More
@@ -224,6 +224,12 b' coreconfigitem(' | |||||
224 | b'color', b'pagermode', default=dynamicdefault, |
|
224 | b'color', b'pagermode', default=dynamicdefault, | |
225 | ) |
|
225 | ) | |
226 | coreconfigitem( |
|
226 | coreconfigitem( | |
|
227 | b'command-templates', | |||
|
228 | b'graphnode', | |||
|
229 | default=None, | |||
|
230 | alias=[(b'ui', b'graphnodetemplate')], | |||
|
231 | ) | |||
|
232 | coreconfigitem( | |||
227 | b'command-templates', b'log', default=None, alias=[(b'ui', b'logtemplate')], |
|
233 | b'command-templates', b'log', default=None, alias=[(b'ui', b'logtemplate')], | |
228 | ) |
|
234 | ) | |
229 | _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.') |
|
235 | _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.') | |
@@ -1291,9 +1297,6 b' coreconfigitem(' | |||||
1291 | b'ui', b'formatted', default=None, |
|
1297 | b'ui', b'formatted', default=None, | |
1292 | ) |
|
1298 | ) | |
1293 | coreconfigitem( |
|
1299 | coreconfigitem( | |
1294 | b'ui', b'graphnodetemplate', default=None, |
|
|||
1295 | ) |
|
|||
1296 | coreconfigitem( |
|
|||
1297 | b'ui', b'interactive', default=None, |
|
1300 | b'ui', b'interactive', default=None, | |
1298 | ) |
|
1301 | ) | |
1299 | coreconfigitem( |
|
1302 | coreconfigitem( |
@@ -2334,8 +2334,7 b' User interface controls.' | |||||
2334 | UTF-8. (default: ISO-8859-1) |
|
2334 | UTF-8. (default: ISO-8859-1) | |
2335 |
|
2335 | |||
2336 | ``graphnodetemplate`` |
|
2336 | ``graphnodetemplate`` | |
2337 | The template used to print changeset nodes in an ASCII revision graph. |
|
2337 | (DEPRECATED) Use ``command-templates.graphnode`` instead. | |
2338 | (default: ``{graphnode}``) |
|
|||
2339 |
|
2338 | |||
2340 | ``ignore`` |
|
2339 | ``ignore`` | |
2341 | A file to read per-user ignore patterns from. This file should be |
|
2340 | A file to read per-user ignore patterns from. This file should be | |
@@ -2566,6 +2565,10 b' User interface controls.' | |||||
2566 |
|
2565 | |||
2567 | Templates used for customizing the output of commands. |
|
2566 | Templates used for customizing the output of commands. | |
2568 |
|
2567 | |||
|
2568 | ``graphnode`` | |||
|
2569 | The template used to print changeset nodes in an ASCII revision graph. | |||
|
2570 | (default: ``{graphnode}``) | |||
|
2571 | ||||
2569 | ``log`` |
|
2572 | ``log`` | |
2570 | Template string for commands that print changesets. |
|
2573 | Template string for commands that print changesets. | |
2571 |
|
2574 |
@@ -1111,7 +1111,7 b' def getlinerangerevs(repo, userrevs, opt' | |||||
1111 |
|
1111 | |||
1112 |
|
1112 | |||
1113 | def _graphnodeformatter(ui, displayer): |
|
1113 | def _graphnodeformatter(ui, displayer): | |
1114 |
spec = ui.config(b' |
|
1114 | spec = ui.config(b'command-templates', b'graphnode') | |
1115 | if not spec: |
|
1115 | if not spec: | |
1116 | return templatekw.getgraphnode # fast path for "{graphnode}" |
|
1116 | return templatekw.getgraphnode # fast path for "{graphnode}" | |
1117 |
|
1117 |
@@ -2534,7 +2534,7 b' working-directory revision' | |||||
2534 |
|
2534 | |||
2535 | node template with changesetprinter: |
|
2535 | node template with changesetprinter: | |
2536 |
|
2536 | |||
2537 |
$ hg log -Gqr 5:7 --config |
|
2537 | $ hg log -Gqr 5:7 --config command-templates.graphnode='"{rev}"' | |
2538 | 7 7:9febbb9c8b2e |
|
2538 | 7 7:9febbb9c8b2e | |
2539 | \xe2\x94\x82 (esc) |
|
2539 | \xe2\x94\x82 (esc) | |
2540 | 6 6:9feeac35a70a |
|
2540 | 6 6:9feeac35a70a | |
@@ -2547,7 +2547,7 b' node template with changesetprinter:' | |||||
2547 | node template with changesettemplater (shared cache variable): |
|
2547 | node template with changesettemplater (shared cache variable): | |
2548 |
|
2548 | |||
2549 | $ hg log -Gr 5:7 -T '{latesttag % "{rev} {tag}+{distance}"}\n' \ |
|
2549 | $ hg log -Gr 5:7 -T '{latesttag % "{rev} {tag}+{distance}"}\n' \ | |
2550 |
> --config |
|
2550 | > --config command-templates.graphnode='{ifeq(latesttagdistance, 0, "#", graphnode)}' | |
2551 | \xe2\x97\x8b 7 foo-bar+1 (esc) |
|
2551 | \xe2\x97\x8b 7 foo-bar+1 (esc) | |
2552 | \xe2\x94\x82 (esc) |
|
2552 | \xe2\x94\x82 (esc) | |
2553 | # 6 foo-bar+0 |
|
2553 | # 6 foo-bar+0 | |
@@ -2560,7 +2560,7 b' node template with changesettemplater (s' | |||||
2560 | label() should just work in node template: |
|
2560 | label() should just work in node template: | |
2561 |
|
2561 | |||
2562 | $ hg log -Gqr 7 --config extensions.color= --color=debug \ |
|
2562 | $ hg log -Gqr 7 --config extensions.color= --color=debug \ | |
2563 |
> --config |
|
2563 | > --config command-templates.graphnode='{label("branch.{branch}", rev)}' | |
2564 | [branch.default\xe2\x94\x827] [log.node|7:9febbb9c8b2e] (esc) |
|
2564 | [branch.default\xe2\x94\x827] [log.node|7:9febbb9c8b2e] (esc) | |
2565 | \xe2\x94\x82 (esc) |
|
2565 | \xe2\x94\x82 (esc) | |
2566 | \xe2\x95\xa7 (esc) |
|
2566 | \xe2\x95\xa7 (esc) |
@@ -2384,6 +2384,18 b' working-directory revision' | |||||
2384 |
|
2384 | |||
2385 | node template with changesetprinter: |
|
2385 | node template with changesetprinter: | |
2386 |
|
2386 | |||
|
2387 | $ hg log -Gqr 5:7 --config command-templates.graphnode='"{rev}"' | |||
|
2388 | 7 7:9febbb9c8b2e | |||
|
2389 | | | |||
|
2390 | 6 6:9feeac35a70a | |||
|
2391 | |\ | |||
|
2392 | | ~ | |||
|
2393 | 5 5:99b31f1c2782 | |||
|
2394 | | | |||
|
2395 | ~ | |||
|
2396 | ||||
|
2397 | node template with changesetprinter (legacy config): | |||
|
2398 | ||||
2387 | $ hg log -Gqr 5:7 --config ui.graphnodetemplate='"{rev}"' |
|
2399 | $ hg log -Gqr 5:7 --config ui.graphnodetemplate='"{rev}"' | |
2388 | 7 7:9febbb9c8b2e |
|
2400 | 7 7:9febbb9c8b2e | |
2389 | | |
|
2401 | | | |
@@ -2397,7 +2409,7 b' node template with changesetprinter:' | |||||
2397 | node template with changesettemplater (shared cache variable): |
|
2409 | node template with changesettemplater (shared cache variable): | |
2398 |
|
2410 | |||
2399 | $ hg log -Gr 5:7 -T '{latesttag % "{rev} {tag}+{distance}"}\n' \ |
|
2411 | $ hg log -Gr 5:7 -T '{latesttag % "{rev} {tag}+{distance}"}\n' \ | |
2400 |
> --config |
|
2412 | > --config command-templates.graphnode='{ifeq(latesttagdistance, 0, "#", graphnode)}' | |
2401 | o 7 foo-bar+1 |
|
2413 | o 7 foo-bar+1 | |
2402 | | |
|
2414 | | | |
2403 | # 6 foo-bar+0 |
|
2415 | # 6 foo-bar+0 | |
@@ -2410,7 +2422,7 b' node template with changesettemplater (s' | |||||
2410 | label() should just work in node template: |
|
2422 | label() should just work in node template: | |
2411 |
|
2423 | |||
2412 | $ hg log -Gqr 7 --config extensions.color= --color=debug \ |
|
2424 | $ hg log -Gqr 7 --config extensions.color= --color=debug \ | |
2413 |
> --config |
|
2425 | > --config command-templates.graphnode='{label("branch.{branch}", rev)}' | |
2414 | [branch.default|7] [log.node|7:9febbb9c8b2e] |
|
2426 | [branch.default|7] [log.node|7:9febbb9c8b2e] | |
2415 | | |
|
2427 | | | |
2416 | ~ |
|
2428 | ~ |
General Comments 0
You need to be logged in to leave comments.
Login now