Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/webcommands.py @ 14490:1d3e2349304a
web: provide diffstat to the changeset page
This includes all affected files, so it can be used for an extended view of
the files or as a replacement for the filenodelink and filenolink templates.
author | Steven Brown <StevenGBrown@gmail.com> |
---|---|
date | Sat, 28 May 2011 14:44:45 +0800 |
parents | 421d56a055fd |
children | 175e4b9d8a96 |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Tue May 31 16:24:47 2011 -0500 +++ b/mercurial/hgweb/webcommands.py Sat May 28 14:44:45 2011 +0800 @@ -263,12 +263,16 @@ node=ctx.hex(), file=f, parity=parity.next())) - parity = paritygen(web.stripecount) style = web.config('web', 'style', 'paper') if 'style' in req.form: style = req.form['style'][0] + parity = paritygen(web.stripecount) diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style) + + parity = paritygen(web.stripecount) + diffstat = lambda: webutil.diffstat(tmpl, ctx, parity) + return tmpl('changeset', diff=diffs, rev=ctx.rev(), @@ -282,6 +286,7 @@ desc=ctx.description(), date=ctx.date(), files=files, + diffstat=diffstat, archives=web.archivelist(ctx.hex()), tags=webutil.nodetagsdict(web.repo, ctx.node()), bookmarks=webutil.nodebookmarksdict(web.repo, ctx.node()),