diff mercurial/templater.py @ 25562:9452112c8eb0 stable

templater: evaluate arguments passed to diff() appropriately Before this patch, diff() crashed by passing non-string expression because it didn't evaluate arguments at all.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 13 Jun 2015 20:14:22 +0900
parents 7298da81f5a9
children a69983942fb4 5eccebe23942
line wrap: on
line diff
--- a/mercurial/templater.py	Fri Jun 12 14:43:59 2015 -0700
+++ b/mercurial/templater.py	Sat Jun 13 20:14:22 2015 +0900
@@ -248,7 +248,7 @@
 
     def getpatterns(i):
         if i < len(args):
-            s = args[i][1].strip()
+            s = stringify(args[i][0](context, mapping, args[i][1])).strip()
             if s:
                 return [s]
         return []