Mercurial > public > mercurial-scm > hg
diff hgext/color.py @ 25597:fd5bc660c9f0
templater: do not reevaluate rawstring as template (BC)
The previous patch made 'string' is always interpreted as a template. So
this patch removes the special handling of r'rawstring' instead. Now r''
disables template processing at all.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 10 Jun 2015 21:44:43 +0900 |
parents | dd511b5cb818 |
children | 328739ea70c3 |
line wrap: on
line diff
--- a/hgext/color.py Sat Jun 13 19:49:54 2015 +0900 +++ b/hgext/color.py Wed Jun 10 21:44:43 2015 +0900 @@ -496,14 +496,14 @@ # etc. don't need to be quoted mapping.update(dict([(k, k) for k in _effects])) - thing = templater._evalifliteral(args[1], context, mapping) + thing = args[1][0](context, mapping, args[1][1]) # apparently, repo could be a string that is the favicon? repo = mapping.get('repo', '') if isinstance(repo, str): return thing - label = templater._evalifliteral(args[0], context, mapping) + label = args[0][0](context, mapping, args[0][1]) thing = templater.stringify(thing) label = templater.stringify(label)