Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/webutil.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 | 46293a0c7e9f |
children | 8d5de52431f2 25e572394f5c |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Mon Aug 24 12:47:44 2009 +0200 +++ b/mercurial/hgweb/webutil.py Wed Aug 26 14:58:09 2009 +0200 @@ -153,7 +153,7 @@ if len(files) > max: yield tmpl('fileellipses') -def diffs(repo, tmpl, ctx, files, parity): +def diffs(repo, tmpl, ctx, files, parity, style): def countgen(): start = 1 @@ -195,7 +195,7 @@ yield tmpl('diffblock', parity=parity.next(), lines=prettyprintlines(''.join(block))) block = [] - if chunk.startswith('diff'): + if chunk.startswith('diff') and style != 'raw': chunk = ''.join(chunk.splitlines(True)[1:]) block.append(chunk) yield tmpl('diffblock', parity=parity.next(),