Mercurial > hg
comparison tests/test-command-template.t @ 19058:d8d548d868d3
template: call runtemplate on the src argument to sub
This allows using a template keyword on calls to the sub function and brings
the function inline with most other semantics of the other template functions.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 10 Apr 2013 19:27:49 -0500 |
parents | 3cdb6f2f6789 |
children | d982edcfe7f0 |
comparison
equal
deleted
inserted
replaced
19057:3d265e0822d3 | 19058:d8d548d868d3 |
---|---|
1529 Test new-style inline templating: | 1529 Test new-style inline templating: |
1530 | 1530 |
1531 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' | 1531 $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' |
1532 modified files: .hgtags | 1532 modified files: .hgtags |
1533 | 1533 |
1534 Test the sub function of templating for expansion: | |
1535 | |
1536 $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n' | |
1537 xx |