hgweb: get rid of raw-related code in hgweb.filerevision()
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Mon, 28 Jan 2008 13:42:40 +0100
changeset 5962 0011316fbe0e
parent 5961 ed4d55c2366f
child 5963 5be210afe1b8
hgweb: get rid of raw-related code in hgweb.filerevision()
mercurial/hgweb/hgweb_mod.py
--- 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(),