Mercurial > hg
diff mercurial/help/templates.txt @ 32875:c8f2cf18b82e
formatter: load templates section like a map file
Since a map file has another level to select a template (spec -> mapfile
-> topic), this isn't exactly the same as how a map file works. But I believe
most users would expect the new behavior.
A literal template is stored as an unnamed template so that it will never
conflict with the templates defined in [templates] section.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 22 Apr 2017 20:14:55 +0900 |
parents | de86a6872d06 |
children | 61b60b28c381 |
line wrap: on
line diff
--- a/mercurial/help/templates.txt Sat May 06 17:41:05 2017 +0900 +++ b/mercurial/help/templates.txt Sat Apr 22 20:14:55 2017 +0900 @@ -109,6 +109,14 @@ $ hg log -r . -Tnodedate +A template defined in ``templates`` section can also be referenced from +another template:: + + $ hg log -r . -T "{rev} {nodedate}" + +but be aware that the keywords cannot be overridden by templates. For example, +a template defined as ``templates.rev`` cannot be referenced as ``{rev}``. + Examples ========