diff mercurial/templatefuncs.py @ 38256:688fbb758ba9

templater: resolve type of dict key in getmember() This seems more correct and is consistent with the future wrapped.contains() function, where a key type has to be resolved depending on a container type.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 04 May 2018 12:43:15 +0900
parents 06d11cd90516
children 41ae9b3cbfb9
line wrap: on
line diff
--- a/mercurial/templatefuncs.py	Wed Mar 21 11:30:21 2018 +0900
+++ b/mercurial/templatefuncs.py	Fri May 04 12:43:15 2018 +0900
@@ -262,7 +262,7 @@
         raise error.ParseError(_("get() expects two arguments"))
 
     dictarg = evalwrapped(context, mapping, args[0])
-    key = evalfuncarg(context, mapping, args[1])
+    key = evalrawexp(context, mapping, args[1])
     try:
         return dictarg.getmember(context, mapping, key)
     except error.ParseError as err: