mercurial/hgweb.py
changeset 2095 0bf2a9e5eff1
parent 1964 778281d46bb2
child 2103 caccf539c9a4
equal deleted inserted replaced
2094:c067ee483d2e 2095:0bf2a9e5eff1
   417         mfn = cs[0]
   417         mfn = cs[0]
   418 
   418 
   419         mt = mimetypes.guess_type(f)[0]
   419         mt = mimetypes.guess_type(f)[0]
   420         rawtext = text
   420         rawtext = text
   421         if util.binary(text):
   421         if util.binary(text):
   422             text = "(binary:%s)" % mt
   422             text = "(binary:%s)" % (mt or 'data')
       
   423         mt = mt or 'text/plain'
   423 
   424 
   424         def lines():
   425         def lines():
   425             for l, t in enumerate(text.splitlines(1)):
   426             for l, t in enumerate(text.splitlines(1)):
   426                 yield {"line": t,
   427                 yield {"line": t,
   427                        "linenumber": "% 6d" % (l + 1),
   428                        "linenumber": "% 6d" % (l + 1),