Mercurial > hg
diff 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 |
line wrap: on
line diff
--- a/tests/test-branches.t Sat Apr 22 21:38:08 2017 +0900 +++ b/tests/test-branches.t Sat Apr 22 21:46:14 2017 +0900 @@ -530,6 +530,19 @@ a: Adding b branch head 2 default: Adding root node + $ cat <<'EOF' > "$TESTTMP/map-myjson" + > docheader = '\{\n' + > docfooter = '\n}\n' + > branches = '{ifeq(index, 0, "", ",\n")} {dict(branch, node|short)|json}' + > EOF + $ hg branches -T "$TESTTMP/map-myjson" + { + {"branch": "b", "node": "e23b5505d1ad"}, + {"branch": "a branch *", "node": "10ff5895aa57"}, (glob) + {"branch": "a", "node": "d8cbc61dbaa6"}, + {"branch": "default", "node": "19709c5a4e75"} + } + Tests of revision branch name caching We rev branch cache is updated automatically. In these tests we use a trick to