web: prevent TypeError thrown when using the diffstat templates
authorSteven Brown <StevenGBrown@gmail.com>
Thu, 02 Jun 2011 18:52:31 +0800
changeset 14514 175e4b9d8a96
parent 14513 85fe676c27e9
child 14515 76f295eaed86
web: prevent TypeError thrown when using the diffstat templates Remove the lambda used to wrap webutil.diffstat because: - functions passed to the templater must accept keyword arguments - webutil.diffstat is a generator, so already calculates the diffstat lazily This reverts the changes made to 1d3e2349304a after it was submitted to the mailing list but before it was queued.
mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	Thu Jun 02 11:27:40 2011 -0500
+++ b/mercurial/hgweb/webcommands.py	Thu Jun 02 18:52:31 2011 +0800
@@ -271,7 +271,7 @@
     diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style)
 
     parity = paritygen(web.stripecount)
-    diffstat = lambda: webutil.diffstat(tmpl, ctx, parity)
+    diffstat = webutil.diffstat(tmpl, ctx, parity)
 
     return tmpl('changeset',
                 diff=diffs,