changeset 32189:f238a483a1fd

webcommands: use fctx.isbinary
author Jun Wu <quark@fb.com>
date Wed, 03 May 2017 18:04:43 -0700
parents 347ab2d47463
children 4fadea09feca
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Wed May 03 18:03:38 2017 -0700
+++ b/mercurial/hgweb/webcommands.py	Wed May 03 18:04:43 2017 -0700
@@ -808,7 +808,7 @@
         context = parsecontext(web.config('web', 'comparisoncontext', '5'))
 
     def filelines(f):
-        if util.binary(f.data()):
+        if f.isbinary():
             mt = mimetypes.guess_type(f.path())[0]
             if not mt:
                 mt = 'application/octet-stream'
@@ -886,7 +886,7 @@
             yield p
 
     def annotate(**map):
-        if util.binary(fctx.data()):
+        if fctx.isbinary():
             mt = (mimetypes.guess_type(fctx.path())[0]
                   or 'application/octet-stream')
             lines = [((fctx.filectx(fctx.filerev()), 1), '(binary:%s)' % mt)]