Show More
@@ -585,12 +585,9 b' class hgweb(object):' | |||||
585 | n = fctx.filenode() |
|
585 | n = fctx.filenode() | |
586 | parity = paritygen(self.stripecount) |
|
586 | parity = paritygen(self.stripecount) | |
587 |
|
587 | |||
588 | mt = mimetypes.guess_type(f)[0] |
|
|||
589 | rawtext = text |
|
|||
590 | if util.binary(text): |
|
588 | if util.binary(text): | |
591 | mt = mt or 'application/octet-stream' |
|
589 | mt = mimetypes.guess_type(f)[0] or 'application/octet-stream' | |
592 |
text = |
|
590 | text = '(binary:%s)' % mt | |
593 | mt = mt or 'text/plain' |
|
|||
594 |
|
591 | |||
595 | def lines(): |
|
592 | def lines(): | |
596 | for l, t in enumerate(text.splitlines(1)): |
|
593 | for l, t in enumerate(text.splitlines(1)): | |
@@ -602,8 +599,6 b' class hgweb(object):' | |||||
602 | file=f, |
|
599 | file=f, | |
603 | path=_up(f), |
|
600 | path=_up(f), | |
604 | text=lines(), |
|
601 | text=lines(), | |
605 | raw=rawtext, |
|
|||
606 | mimetype=mt, |
|
|||
607 | rev=fctx.rev(), |
|
602 | rev=fctx.rev(), | |
608 | node=hex(fctx.node()), |
|
603 | node=hex(fctx.node()), | |
609 | author=fctx.user(), |
|
604 | author=fctx.user(), |
General Comments 0
You need to be logged in to leave comments.
Login now