Mercurial > hg
comparison tests/test-branches.t @ 32949:13eebc189ff3
formatter: add support for docheader and docfooter templates
templatepartsmap() is a minimal copy of changeset_templater.__init__(). I
tried to factor out a common function, but it was unnecessarily complicated.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 22 Apr 2017 21:46:14 +0900 |
parents | a5bad127128d |
children | 5100ce217dfa |
comparison
equal
deleted
inserted
replaced
32948:12a0794fa2e3 | 32949:13eebc189ff3 |
---|---|
527 $ hg branches -T '{word(0, branch)}: {desc|firstline}\n' | 527 $ hg branches -T '{word(0, branch)}: {desc|firstline}\n' |
528 b: reopen branch with a change | 528 b: reopen branch with a change |
529 a: Adding d branch | 529 a: Adding d branch |
530 a: Adding b branch head 2 | 530 a: Adding b branch head 2 |
531 default: Adding root node | 531 default: Adding root node |
532 | |
533 $ cat <<'EOF' > "$TESTTMP/map-myjson" | |
534 > docheader = '\{\n' | |
535 > docfooter = '\n}\n' | |
536 > branches = '{ifeq(index, 0, "", ",\n")} {dict(branch, node|short)|json}' | |
537 > EOF | |
538 $ hg branches -T "$TESTTMP/map-myjson" | |
539 { | |
540 {"branch": "b", "node": "e23b5505d1ad"}, | |
541 {"branch": "a branch *", "node": "10ff5895aa57"}, (glob) | |
542 {"branch": "a", "node": "d8cbc61dbaa6"}, | |
543 {"branch": "default", "node": "19709c5a4e75"} | |
544 } | |
532 | 545 |
533 Tests of revision branch name caching | 546 Tests of revision branch name caching |
534 | 547 |
535 We rev branch cache is updated automatically. In these tests we use a trick to | 548 We rev branch cache is updated automatically. In these tests we use a trick to |
536 trigger rebuilds. We remove the branch head cache and run 'hg head' to cause a | 549 trigger rebuilds. We remove the branch head cache and run 'hg head' to cause a |