# HG changeset patch # User Yuya Nishihara # Date 2018-04-01 15:46:33 # 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 --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -292,7 +292,7 @@ def branchentries(repo, stripecount, lim 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 @@ def branchentries(repo, stripecount, lim 'date': ctx.date() } - return entries + return templateutil.mappinggenerator(entries) def cleanpath(repo, path): path = path.lstrip('/')