diff -r 89db78126f7f -r 10d3dc8123c5 mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py Mon Apr 02 00:46:33 2018 +0900 +++ b/mercurial/hgweb/webutil.py Tue Apr 03 22:54:36 2018 +0900 @@ -378,7 +378,7 @@ def formatlinerange(fromline, toline): return '%d:%d' % (fromline + 1, toline) -def succsandmarkers(context, mapping): +def _succsandmarkersgen(context, mapping): repo = context.resource(mapping, 'repo') itemmappings = templatekw.showsuccsandmarkers(context, mapping) for item in itemmappings.tovalue(context, mapping): @@ -386,6 +386,9 @@ for successor in item['successors']) yield item +def succsandmarkers(context, mapping): + return templateutil.mappinggenerator(_succsandmarkersgen, args=(mapping,)) + # teach templater succsandmarkers is switched to (context, mapping) API succsandmarkers._requires = {'repo', 'ctx'}