mercurial/templater.py
changeset 14943 d3bb825ddae3
parent 14941 4a28cb4df1f8
child 14944 e2c413bde8a5
equal deleted inserted replaced
14942:5b072d4b62f2 14943:d3bb825ddae3
   133 
   133 
   134 def runsymbol(context, mapping, key):
   134 def runsymbol(context, mapping, key):
   135     v = mapping.get(key)
   135     v = mapping.get(key)
   136     if v is None:
   136     if v is None:
   137         v = context._defaults.get(key, '')
   137         v = context._defaults.get(key, '')
   138     if hasattr(v, '__call__'):
   138     if util.safehasattr(v, '__call__'):
   139         return v(**mapping)
   139         return v(**mapping)
   140     return v
   140     return v
   141 
   141 
   142 def buildfilter(exp, context):
   142 def buildfilter(exp, context):
   143     func, data = compileexp(exp[1], context)
   143     func, data = compileexp(exp[1], context)