diff mercurial/templater.py @ 25509:576d6c74784b

templater: make pad function evaluate both string and rawstring templates "pad" function and "rawstring" type were introduced in parallel, aa51392da507 in default and 5ab28a2e9962 in stable respectively. Therefore, "pad" function lacked handling of "rawstring" unintentionally.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 08 Jun 2015 18:48:45 +0900
parents ad14fb602e5e
children a69983942fb4
line wrap: on
line diff
--- a/mercurial/templater.py	Sat Jun 06 22:10:18 2015 -0400
+++ b/mercurial/templater.py	Mon Jun 08 18:48:45 2015 +0900
@@ -310,10 +310,7 @@
 
     width = int(args[1][1])
 
-    text = stringify(args[0][0](context, mapping, args[0][1]))
-    if args[0][0] == runstring:
-        text = stringify(runtemplate(context, mapping,
-            compiletemplate(text, context)))
+    text = stringify(_evalifliteral(args[0], context, mapping))
 
     right = False
     fillchar = ' '