Mercurial > public > mercurial-scm > hg-stable
diff tests/test-command-template.t @ 34715:f17a0e18c47e
templater: load aliases from [templatealias] section in map file
This seems sometimes useful as an alias can be a function, but a template
fragment can't.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 14 Oct 2017 18:06:42 +0900 |
parents | f4aeb952ab77 |
children | 1644623ab096 |
line wrap: on
line diff
--- a/tests/test-command-template.t Sat Oct 14 17:51:01 2017 +0900 +++ b/tests/test-command-template.t Sat Oct 14 18:06:42 2017 +0900 @@ -259,11 +259,13 @@ $ hg log -l1 -T./map-simple 8 - a map file may have [templates] section: + a map file may have [templates] and [templatealias] sections: $ cat <<'EOF' > map-simple > [templates] - > changeset = "{rev}\n" + > changeset = "{a}\n" + > [templatealias] + > a = rev > EOF $ hg log -l1 -T./map-simple 8 @@ -277,6 +279,8 @@ > EOF $ HGRCPATH=./myhgrc hg log -l1 -Tfoo 8 + $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n' + 8 Test template map inheritance