Show More
@@ -569,8 +569,7 def word(context, mapping, args): | |||
|
569 | 569 | num = int(stringify(args[0][0](context, mapping, args[0][1]))) |
|
570 | 570 | except ValueError: |
|
571 | 571 | # i18n: "word" is a keyword |
|
572 | raise error.ParseError( | |
|
573 | _("Use strings like '3' for numbers passed to word function")) | |
|
572 | raise error.ParseError(_("word expects an integer index")) | |
|
574 | 573 | text = stringify(args[1][0](context, mapping, args[1][1])) |
|
575 | 574 | if len(args) == 3: |
|
576 | 575 | splitter = stringify(args[2][0](context, mapping, args[2][1])) |
@@ -2778,5 +2778,5 Test word for integer literal | |||
|
2778 | 2778 | Test word for invalid numbers |
|
2779 | 2779 | |
|
2780 | 2780 | $ hg log -Gv -R a --template "{word('a', desc)}" |
|
2781 | hg: parse error: Use strings like '3' for numbers passed to word function | |
|
2781 | hg: parse error: word expects an integer index | |
|
2782 | 2782 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now