Mercurial > hg-stable
changeset 37957:89db78126f7f
hgweb: wrap {branches} and {entries} of branches with mappinggenerator
Bare generator of mappings shouldn't be put in a template mapping because
its type can't be determined without consuming it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 02 Apr 2018 00:46:33 +0900 |
parents | 16c7a6ac8f94 |
children | 10d3dc8123c5 |
files | mercurial/hgweb/webutil.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Mon Apr 02 00:41:19 2018 +0900 +++ b/mercurial/hgweb/webutil.py Mon Apr 02 00:46:33 2018 +0900 @@ -292,7 +292,7 @@ parity = paritygen(stripecount) sortkey = lambda item: (not item[1], item[0].rev()) - def entries(**map): + def entries(context): count = 0 if not tips: for tag, hs, tip, closed in repo.branchmap().iterbranches(): @@ -315,7 +315,7 @@ 'date': ctx.date() } - return entries + return templateutil.mappinggenerator(entries) def cleanpath(repo, path): path = path.lstrip('/')