Mercurial > hg
changeset 37915:3dc4045db164
hgweb: wrap {whyunstable} with mappinggenerator
This is also a generator of mappings, which needs a wrapper.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 03 Apr 2018 22:55:33 +0900 |
parents | 10d3dc8123c5 |
children | 34f259a1c153 |
files | mercurial/hgweb/webutil.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Tue Apr 03 22:54:36 2018 +0900 +++ b/mercurial/hgweb/webutil.py Tue Apr 03 22:55:33 2018 +0900 @@ -392,7 +392,7 @@ # teach templater succsandmarkers is switched to (context, mapping) API succsandmarkers._requires = {'repo', 'ctx'} -def whyunstable(context, mapping): +def _whyunstablegen(context, mapping): repo = context.resource(mapping, 'repo') ctx = context.resource(mapping, 'ctx') @@ -402,6 +402,9 @@ entry['divergentnodes'] = _siblings(entry['divergentnodes']) yield entry +def whyunstable(context, mapping): + return templateutil.mappinggenerator(_whyunstablegen, args=(mapping,)) + whyunstable._requires = {'repo', 'ctx'} def commonentry(repo, ctx):