mercurial/templater.py
changeset 34325 86d050abd5c1
parent 34324 e473f482b9b3
child 34326 e60c601953d7
equal deleted inserted replaced
34324:e473f482b9b3 34325:86d050abd5c1
   408         else:
   408         else:
   409             msg = _("incompatible use of template filter '%s'") % filt.func_name
   409             msg = _("incompatible use of template filter '%s'") % filt.func_name
   410         raise error.Abort(msg)
   410         raise error.Abort(msg)
   411 
   411 
   412 def buildmap(exp, context):
   412 def buildmap(exp, context):
   413     func, data = compileexp(exp[1], context, methods)
   413     darg = compileexp(exp[1], context, methods)
   414     tfunc, tdata = gettemplate(exp[2], context)
   414     targ = gettemplate(exp[2], context)
   415     return (runmap, (func, data, tfunc, tdata))
   415     return (runmap, (darg, targ))
   416 
   416 
   417 def runmap(context, mapping, data):
   417 def runmap(context, mapping, data):
   418     func, data, tfunc, tdata = data
   418     (func, data), (tfunc, tdata) = data
   419     d = func(context, mapping, data)
   419     d = func(context, mapping, data)
   420     if util.safehasattr(d, 'itermaps'):
   420     if util.safehasattr(d, 'itermaps'):
   421         diter = d.itermaps()
   421         diter = d.itermaps()
   422     else:
   422     else:
   423         try:
   423         try: