Mercurial > hg
changeset 5962:0011316fbe0e
hgweb: get rid of raw-related code in hgweb.filerevision()
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 28 Jan 2008 13:42:40 +0100 |
parents | ed4d55c2366f |
children | 5be210afe1b8 |
files | mercurial/hgweb/hgweb_mod.py |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Sat Jan 26 13:04:36 2008 +0000 +++ b/mercurial/hgweb/hgweb_mod.py Mon Jan 28 13:42:40 2008 +0100 @@ -585,12 +585,9 @@ n = fctx.filenode() parity = paritygen(self.stripecount) - mt = mimetypes.guess_type(f)[0] - rawtext = text if util.binary(text): - mt = mt or 'application/octet-stream' - text = "(binary:%s)" % mt - mt = mt or 'text/plain' + mt = mimetypes.guess_type(f)[0] or 'application/octet-stream' + text = '(binary:%s)' % mt def lines(): for l, t in enumerate(text.splitlines(1)): @@ -602,8 +599,6 @@ file=f, path=_up(f), text=lines(), - raw=rawtext, - mimetype=mt, rev=fctx.rev(), node=hex(fctx.node()), author=fctx.user(),