mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
hgweb: get rid of raw-related code in hgweb.filerevision()
This commit is contained in:
parent
bb3bdb2336
commit
6bc7bb23af
@ -585,12 +585,9 @@ class hgweb(object):
|
||||
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 @@ class hgweb(object):
|
||||
file=f,
|
||||
path=_up(f),
|
||||
text=lines(),
|
||||
raw=rawtext,
|
||||
mimetype=mt,
|
||||
rev=fctx.rev(),
|
||||
node=hex(fctx.node()),
|
||||
author=fctx.user(),
|
||||
|
Loading…
Reference in New Issue
Block a user