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.
--- 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('/')