Mercurial > hg
changeset 28347:ccb33e965150
color: make label() template function stringify "expr" argument first
Since label() should return a string (or a thunk to be evaluated to a string),
this change is okay. This helps porting to evalstring() helper. See the next
patch for details.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 05 Mar 2016 00:01:36 +0900 |
parents | 542d200bd261 |
children | ccedb17a5657 |
files | hgext/color.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/color.py Sun Feb 14 13:09:17 2016 +0900 +++ b/hgext/color.py Sat Mar 05 00:01:36 2016 +0900 @@ -490,6 +490,7 @@ mapping.update(dict([(k, k) for k in _effects])) thing = args[1][0](context, mapping, args[1][1]) + thing = templater.stringify(thing) # apparently, repo could be a string that is the favicon? repo = mapping.get('repo', '') @@ -497,8 +498,6 @@ return thing label = args[0][0](context, mapping, args[0][1]) - - thing = templater.stringify(thing) label = templater.stringify(label) return repo.ui.label(thing, label)