changeset 38222:fb5803f4fb87

hgweb: wrap {nodes} of graph with mappinggenerator It was a generator of mappings, which shouldn't be put in template mappings.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 04 Apr 2018 20:48:00 +0900
parents 215021e506e2
children 86f980a8cacf
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)