hgext/color.py
branchstable
changeset 20067 3d8bfe2ecf6d
parent 19854 49d4919d21c2
child 20455 a2c08adbb86e
child 20661 7e627fe63e5e
equal deleted inserted replaced
20066:64b4f0cd7336 20067:3d8bfe2ecf6d
   384 def templatelabel(context, mapping, args):
   384 def templatelabel(context, mapping, args):
   385     if len(args) != 2:
   385     if len(args) != 2:
   386         # i18n: "label" is a keyword
   386         # i18n: "label" is a keyword
   387         raise error.ParseError(_("label expects two arguments"))
   387         raise error.ParseError(_("label expects two arguments"))
   388 
   388 
   389     thing = templater.stringify(args[1][0](context, mapping, args[1][1]))
   389     thing = templater._evalifliteral(args[1], context, mapping)
   390     thing = templater.runtemplate(context, mapping,
       
   391                                   templater.compiletemplate(thing, context))
       
   392 
   390 
   393     # apparently, repo could be a string that is the favicon?
   391     # apparently, repo could be a string that is the favicon?
   394     repo = mapping.get('repo', '')
   392     repo = mapping.get('repo', '')
   395     if isinstance(repo, str):
   393     if isinstance(repo, str):
   396         return thing
   394         return thing