Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/webcommands.py @ 9402:5d49fdef6fd0
hgweb: show diff header line in raw diffs
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 26 Aug 2009 14:58:09 +0200 |
parents | acd03a6e2426 |
children | 4483af166c61 |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Mon Aug 24 12:47:44 2009 +0200 +++ b/mercurial/hgweb/webcommands.py Wed Aug 26 14:58:09 2009 +0200 @@ -236,7 +236,11 @@ parity=parity.next())) parity = paritygen(web.stripecount) - diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity) + style = web.config('web', 'style', 'paper') + if 'style' in req.form: + style = req.form['style'][0] + + diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style) return tmpl('changeset', diff=diffs, rev=ctx.rev(), @@ -474,7 +478,11 @@ # path already defined in except clause parity = paritygen(web.stripecount) - diffs = webutil.diffs(web.repo, tmpl, fctx or ctx, [path], parity) + style = web.config('web', 'style', 'paper') + if 'style' in req.form: + style = req.form['style'][0] + + diffs = webutil.diffs(web.repo, tmpl, fctx or ctx, [path], parity, style) rename = fctx and webutil.renamelink(fctx) or [] ctx = fctx and fctx or ctx return tmpl("filediff",