# HG changeset patch # User Yuya Nishihara # Date 1522597593 -32400 # Node ID 89db78126f7f5ab853dc74d089704571007bfbaf # Parent 16c7a6ac8f94e27557a89695605c4e8e3e27cdcb 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. diff -r 16c7a6ac8f94 -r 89db78126f7f mercurial/hgweb/webutil.py --- 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('/')