mercurial/templater.py
changeset 28345 d81437c91a26
parent 28344 ac371d4c007f
child 28346 542d200bd261
--- a/mercurial/templater.py	Sun Feb 14 12:48:14 2016 +0900
+++ b/mercurial/templater.py	Sun Feb 14 13:05:09 2016 +0900
@@ -398,7 +398,9 @@
         # i18n: "pad" is a keyword
         raise error.ParseError(_("pad() expects two to four arguments"))
 
-    width = int(args[1][1])
+    width = evalinteger(context, mapping, args[1],
+                        # i18n: "pad" is a keyword
+                        _("pad() expects an integer width"))
 
     text = stringify(args[0][0](context, mapping, args[0][1]))