[PATCH 3 of 7] hgweb: wrap {nodes} of graph with mappinggenerator
Yuya Nishihara
yuya at tcha.org
Fri May 25 09:54:13 EDT 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1522842480 -32400
# Wed Apr 04 20:48:00 2018 +0900
# Node ID 84207009ae46b829c61e9fcc5f5cd6d91ab90188
# Parent 7758a9a1f49b02dea023ab970e65af1874e6d636
hgweb: wrap {nodes} of graph with mappinggenerator
It was a generator of mappings, which shouldn't be put in template mappings.
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -1330,7 +1330,7 @@ def graph(web):
'vertex': vtx,
'edges': edges}
- def nodes():
+ def nodes(context):
parity = paritygen(web.stripecount)
for row, (id, type, ctx, vtx, edges) in enumerate(tree):
entry = webutil.commonentry(web.repo, ctx)
@@ -1367,7 +1367,7 @@ def graph(web):
changesets=count,
nextentry=templateutil.mappinglist(nextentry),
jsdata=templateutil.mappinggenerator(jsdata),
- nodes=lambda **x: nodes(),
+ nodes=templateutil.mappinggenerator(nodes),
node=ctx.hex(),
changenav=changenav)
More information about the Mercurial-devel
mailing list