Mercurial > hg
diff mercurial/help/templates.txt @ 21820:cce404b0c918
templatefilter: add splitlines function
This is useful for applying changes to each line, and it's especially powerful
when used in conjunction with conditionals to modify lines based on content.
author | Ryan McElroy <rmcelroy@fb.com> |
---|---|
date | Thu, 12 Jun 2014 17:45:41 -0700 |
parents | 01a75c9d5b5e |
children | 4a445dc5abff |
line wrap: on
line diff
--- a/mercurial/help/templates.txt Thu May 01 19:57:25 2014 +0900 +++ b/mercurial/help/templates.txt Thu Jun 12 17:45:41 2014 -0700 @@ -84,6 +84,10 @@ $ hg log -r 0 --template "files: {join(files, ', ')}\n" +- Modify each line of a commit description:: + + $ hg log --template "{splitlines(desc) % '**** {line}\n'}" + - Format date:: $ hg log -r 0 --template "{date(date, '%Y')}\n"