Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
9388:f7968bba2307 | 9402:5d49fdef6fd0 |
---|---|
234 files.append(tmpl(template, | 234 files.append(tmpl(template, |
235 node=ctx.hex(), file=f, | 235 node=ctx.hex(), file=f, |
236 parity=parity.next())) | 236 parity=parity.next())) |
237 | 237 |
238 parity = paritygen(web.stripecount) | 238 parity = paritygen(web.stripecount) |
239 diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity) | 239 style = web.config('web', 'style', 'paper') |
240 if 'style' in req.form: | |
241 style = req.form['style'][0] | |
242 | |
243 diffs = webutil.diffs(web.repo, tmpl, ctx, None, parity, style) | |
240 return tmpl('changeset', | 244 return tmpl('changeset', |
241 diff=diffs, | 245 diff=diffs, |
242 rev=ctx.rev(), | 246 rev=ctx.rev(), |
243 node=ctx.hex(), | 247 node=ctx.hex(), |
244 parent=webutil.parents(ctx), | 248 parent=webutil.parents(ctx), |
472 else: | 476 else: |
473 n = ctx.node() | 477 n = ctx.node() |
474 # path already defined in except clause | 478 # path already defined in except clause |
475 | 479 |
476 parity = paritygen(web.stripecount) | 480 parity = paritygen(web.stripecount) |
477 diffs = webutil.diffs(web.repo, tmpl, fctx or ctx, [path], parity) | 481 style = web.config('web', 'style', 'paper') |
482 if 'style' in req.form: | |
483 style = req.form['style'][0] | |
484 | |
485 diffs = webutil.diffs(web.repo, tmpl, fctx or ctx, [path], parity, style) | |
478 rename = fctx and webutil.renamelink(fctx) or [] | 486 rename = fctx and webutil.renamelink(fctx) or [] |
479 ctx = fctx and fctx or ctx | 487 ctx = fctx and fctx or ctx |
480 return tmpl("filediff", | 488 return tmpl("filediff", |
481 file=path, | 489 file=path, |
482 node=hex(n), | 490 node=hex(n), |