changeset 34325:86d050abd5c1

templater: do not destructure operands in buildmap() This makes the next patch slightly simpler.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 02 Sep 2017 23:09:34 +0900
parents e473f482b9b3
children e60c601953d7
files mercurial/templater.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templater.py	Sat Sep 09 19:01:18 2017 +0900
+++ b/mercurial/templater.py	Sat Sep 02 23:09:34 2017 +0900
@@ -410,12 +410,12 @@
         raise error.Abort(msg)
 
 def buildmap(exp, context):
-    func, data = compileexp(exp[1], context, methods)
-    tfunc, tdata = gettemplate(exp[2], context)
-    return (runmap, (func, data, tfunc, tdata))
+    darg = compileexp(exp[1], context, methods)
+    targ = gettemplate(exp[2], context)
+    return (runmap, (darg, targ))
 
 def runmap(context, mapping, data):
-    func, data, tfunc, tdata = data
+    (func, data), (tfunc, tdata) = data
     d = func(context, mapping, data)
     if util.safehasattr(d, 'itermaps'):
         diter = d.itermaps()