hgweb: wrap {nodes} of graph with mappinggenerator
authorYuya Nishihara <yuya@tcha.org>
Wed, 04 Apr 2018 20:48:00 +0900
changeset 38210 fb5803f4fb87
parent 38209 215021e506e2
child 38211 86f980a8cacf
hgweb: wrap {nodes} of graph with mappinggenerator It was a generator of mappings, which shouldn't be put in template mappings.
mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	Wed Apr 04 20:46:12 2018 +0900
+++ b/mercurial/hgweb/webcommands.py	Wed Apr 04 20:48:00 2018 +0900
@@ -1330,7 +1330,7 @@
                    '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 @@
         changesets=count,
         nextentry=templateutil.mappinglist(nextentry),
         jsdata=templateutil.mappinggenerator(jsdata),
-        nodes=lambda **x: nodes(),
+        nodes=templateutil.mappinggenerator(nodes),
         node=ctx.hex(),
         changenav=changenav)