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