Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/webutil.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 | 956260cbc564 |
children | 356e61e82c2a |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Sat Mar 17 23:34:38 2018 +0900 +++ b/mercurial/hgweb/webutil.py Mon Mar 19 20:23:27 2018 +0900 @@ -355,7 +355,8 @@ def succsandmarkers(context, mapping): repo = context.resource(mapping, 'repo') - for item in templatekw.showsuccsandmarkers(context, mapping): + itemmappings = templatekw.showsuccsandmarkers(context, mapping) + for item in itemmappings.tovalue(context, mapping): item['successors'] = _siblings(repo[successor] for successor in item['successors']) yield item