Show More
@@ -221,9 +221,10 b' def evalfuncarg(context, mapping, arg):' | |||||
221 | return thing |
|
221 | return thing | |
222 |
|
222 | |||
223 | def evalinteger(context, mapping, arg, err): |
|
223 | def evalinteger(context, mapping, arg, err): | |
|
224 | v = evalfuncarg(context, mapping, arg) | |||
224 | try: |
|
225 | try: | |
225 | return int(stringify(arg[0](context, mapping, arg[1]))) |
|
226 | return int(v) | |
226 | except ValueError: |
|
227 | except (TypeError, ValueError): | |
227 | raise error.ParseError(err) |
|
228 | raise error.ParseError(err) | |
228 |
|
229 | |||
229 | def runinteger(context, mapping, data): |
|
230 | def runinteger(context, mapping, data): |
@@ -3148,6 +3148,9 b' Test recursive evaluation:' | |||||
3148 | text.1:be wrapped |
|
3148 | text.1:be wrapped | |
3149 | text.1:desc to be |
|
3149 | text.1:desc to be | |
3150 | text.1:wrapped (no-eol) |
|
3150 | text.1:wrapped (no-eol) | |
|
3151 | $ hg log -l1 -T '{fill(desc, date, "", "")}\n' | |||
|
3152 | hg: parse error: fill expects an integer width | |||
|
3153 | [255] | |||
3151 |
|
3154 | |||
3152 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' |
|
3155 | $ hg log -l 1 --template '{sub(r"[0-9]", "-", author)}' | |
3153 | {node|short} (no-eol) |
|
3156 | {node|short} (no-eol) |
General Comments 0
You need to be logged in to leave comments.
Login now