Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 14514:175e4b9d8a96
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.
author | Steven Brown <StevenGBrown@gmail.com> |
---|---|
date | Thu, 02 Jun 2011 18:52:31 +0800 |
parents | 1d3e2349304a |
children | 9f908ef5a595 |
comparison
equal
deleted
inserted
replaced
14513:85fe676c27e9 | 14514:175e4b9d8a96 |
---|---|
269 | 269 |
270 parity = paritygen(web.stripecount) | 270 parity = paritygen(web.stripecount) |
271 diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style) | 271 diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style) |
272 | 272 |
273 parity = paritygen(web.stripecount) | 273 parity = paritygen(web.stripecount) |
274 diffstat = lambda: webutil.diffstat(tmpl, ctx, parity) | 274 diffstat = webutil.diffstat(tmpl, ctx, parity) |
275 | 275 |
276 return tmpl('changeset', | 276 return tmpl('changeset', |
277 diff=diffs, | 277 diff=diffs, |
278 rev=ctx.rev(), | 278 rev=ctx.rev(), |
279 node=ctx.hex(), | 279 node=ctx.hex(), |