diff -r 21f129354dd0 -r 5b2241e84982 mercurial/formatter.py --- a/mercurial/formatter.py Wed Apr 05 22:25:36 2017 +0900 +++ b/mercurial/formatter.py Wed Apr 05 22:28:09 2017 +0900 @@ -321,8 +321,8 @@ data = util.sortdict(_iteritems(data)) def f(): yield _plainconverter.formatdict(data, key, value, fmt, sep) - return templatekw._hybrid(f(), data, lambda k: {key: k, value: data[k]}, - lambda d: fmt % (d[key], d[value])) + return templatekw.hybriddict(data, key=key, value=value, fmt=fmt, + gen=f()) @staticmethod def formatlist(data, name, fmt, sep): '''build object that can be evaluated as either plain string or list'''