Mercurial > public > mercurial-scm > hg
diff mercurial/templatekw.py @ 37503:49a8c2cc7978
templatekw: fix return type of {succsandmarkers} (BC)
A hybrid object represents a list/dict of values, but {succsandmarkers}
returns a list of template mappings.
This change means old-style list templates (e.g. "start_succsandmarkers")
are no longer supported, but that should be okay since {succsandmarkers}
is still experimental and relatively new.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 19 Mar 2018 20:23:27 +0900 |
parents | 11d51e518808 |
children | 76cd5816268e |
line wrap: on
line diff
--- a/mercurial/templatekw.py Sat Mar 17 23:34:38 2018 +0900 +++ b/mercurial/templatekw.py Mon Mar 19 20:23:27 2018 +0900 @@ -501,7 +501,7 @@ repo = context.resource(mapping, 'repo') values = [] - for x in succsandmarkers: + for x in succsandmarkers.tovalue(context, mapping): v = obsutil.obsfateprinter(ui, repo, x['successors'], x['markers'], scmutil.formatchangeid) values.append(v) @@ -663,8 +663,7 @@ data.append({'successors': successors, 'markers': finalmarkers}) - f = _showcompatlist(context, mapping, 'succsandmarkers', data) - return _hybrid(f, data, lambda x: x, pycompat.identity) + return templateutil.mappinglist(data) @templatekeyword('p1rev', requires={'ctx'}) def showp1rev(context, mapping):