Show More
@@ -251,6 +251,8 b' def sub(context, mapping, args):' | |||
|
251 | 251 | pat = stringify(args[0][0](context, mapping, args[0][1])) |
|
252 | 252 | rpl = stringify(args[1][0](context, mapping, args[1][1])) |
|
253 | 253 | src = stringify(args[2][0](context, mapping, args[2][1])) |
|
254 | src = stringify(runtemplate(context, mapping, | |
|
255 | compiletemplate(src, context))) | |
|
254 | 256 | yield re.sub(pat, rpl, src) |
|
255 | 257 | |
|
256 | 258 | def if_(context, mapping, args): |
@@ -1531,3 +1531,7 b' Test new-style inline templating:' | |||
|
1531 | 1531 | $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n' |
|
1532 | 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 |
General Comments 0
You need to be logged in to leave comments.
Login now