From 58df20579dc2af7172641cfb4abb8309eb1bd49a Mon Sep 17 00:00:00 2001 From: Jun Wu Date: Wed, 3 May 2017 18:04:43 -0700 Subject: [PATCH] webcommands: use fctx.isbinary --- mercurial/hgweb/webcommands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py index 67a1fe78c3..87d8f48420 100644 --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -808,7 +808,7 @@ def comparison(web, req, tmpl): 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 @@ def annotate(web, req, tmpl): 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)]