mercurial/templater.py
changeset 29829 407879b0893b
parent 29828 cc11079644fc
child 29858 b1f69dbdd76b
--- a/mercurial/templater.py	Fri Apr 22 21:29:13 2016 +0900
+++ b/mercurial/templater.py	Fri Apr 22 21:32:30 2016 +0900
@@ -504,7 +504,7 @@
 
     return templatefilters.fill(text, width, initindent, hangindent)
 
-@templatefunc('pad(text, width[, fillchar=\' \'[, right=False]])')
+@templatefunc('pad(text, width[, fillchar=\' \'[, left=False]])')
 def pad(context, mapping, args):
     """Pad text with a
     fill character."""
@@ -518,14 +518,14 @@
 
     text = evalstring(context, mapping, args[0])
 
-    right = False
+    left = False
     fillchar = ' '
     if len(args) > 2:
         fillchar = evalstring(context, mapping, args[2])
     if len(args) > 3:
-        right = evalboolean(context, mapping, args[3])
+        left = evalboolean(context, mapping, args[3])
 
-    if right:
+    if left:
         return text.rjust(width, fillchar)
     else:
         return text.ljust(width, fillchar)