541 {"branch": "b", "node": "e23b5505d1ad"}, |
541 {"branch": "b", "node": "e23b5505d1ad"}, |
542 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob) |
542 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob) |
543 {"branch": "a", "node": "d8cbc61dbaa6"}, |
543 {"branch": "a", "node": "d8cbc61dbaa6"}, |
544 {"branch": "default", "node": "19709c5a4e75"} |
544 {"branch": "default", "node": "19709c5a4e75"} |
545 } |
545 } |
|
546 |
|
547 $ cat <<'EOF' >> .hg/hgrc |
|
548 > [templates] |
|
549 > myjson = ' {dict(branch, node|short)|json}' |
|
550 > myjson:docheader = '\{\n' |
|
551 > myjson:docfooter = '\n}\n' |
|
552 > myjson:separator = ',\n' |
|
553 > EOF |
|
554 $ hg branches -T myjson |
|
555 { |
|
556 {"branch": "b", "node": "e23b5505d1ad"}, |
|
557 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob) |
|
558 {"branch": "a", "node": "d8cbc61dbaa6"}, |
|
559 {"branch": "default", "node": "19709c5a4e75"} |
|
560 } |
|
561 |
|
562 $ cat <<'EOF' >> .hg/hgrc |
|
563 > [templates] |
|
564 > :docheader = 'should not be selected as a docheader for literal templates\n' |
|
565 > EOF |
|
566 $ hg branches -T '{branch}\n' |
|
567 b |
|
568 a branch name much longer than the default justification used by branches |
|
569 a |
|
570 default |
546 |
571 |
547 Tests of revision branch name caching |
572 Tests of revision branch name caching |
548 |
573 |
549 We rev branch cache is updated automatically. In these tests we use a trick to |
574 We rev branch cache is updated automatically. In these tests we use a trick to |
550 trigger rebuilds. We remove the branch head cache and run 'hg head' to cause a |
575 trigger rebuilds. We remove the branch head cache and run 'hg head' to cause a |