##// END OF EJS Templates
templater: relax type of mapped template...
Yuya Nishihara -
r28546:1987ed32 default
parent child Browse files
Show More
@@ -210,7 +210,7 b' def getlist(x):'
210 def gettemplate(exp, context):
210 def gettemplate(exp, context):
211 """Compile given template tree or load named template from map file;
211 """Compile given template tree or load named template from map file;
212 returns (func, data) pair"""
212 returns (func, data) pair"""
213 if exp[0] == 'template':
213 if exp[0] in ('template', 'string'):
214 return compileexp(exp, context, methods)
214 return compileexp(exp, context, methods)
215 if exp[0] == 'symbol':
215 if exp[0] == 'symbol':
216 # unlike runsymbol(), here 'symbol' is always taken as template name
216 # unlike runsymbol(), here 'symbol' is always taken as template name
@@ -2900,12 +2900,8 b' Test string literal:'
2900 template: 0
2900 template: 0
2901 $ hg log -Ra -r0 -T '{r"rawstring: {rev}"}\n'
2901 $ hg log -Ra -r0 -T '{r"rawstring: {rev}"}\n'
2902 rawstring: {rev}
2902 rawstring: {rev}
2903
2903 $ hg log -Ra -r0 -T '{files % r"rawstring: {file}"}\n'
2904 because map operation requires template, raw string can't be used
2904 rawstring: {file}
2905
2906 $ hg log -Ra -r0 -T '{files % r"rawstring"}\n'
2907 hg: parse error: expected template specifier
2908 [255]
2909
2905
2910 Test string escaping:
2906 Test string escaping:
2911
2907
General Comments 0
You need to be logged in to leave comments. Login now