Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templater.py @ 18970:3cdb6f2f6789
templatekw: add default styles for hybrid types (issue3887)
This allows elements like file_copies to be printed as 'name (source)'
when used with join.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 16 Apr 2013 09:44:29 -0500 |
parents | 74ea61318ea8 |
children | d8d548d868d3 |
line wrap: on
line diff
--- a/mercurial/templater.py Wed Apr 10 02:27:35 2013 +0900 +++ b/mercurial/templater.py Tue Apr 16 09:44:29 2013 -0500 @@ -228,7 +228,8 @@ joinset = args[0][0](context, mapping, args[0][1]) if util.safehasattr(joinset, '__call__'): - joinset = [x.values()[0] for x in joinset()] + jf = joinset.joinfmt + joinset = [jf(x) for x in joinset()] joiner = " " if len(args) > 1: