[PATCH 2 of 3] annotate: use fctx.isbinary

Jun Wu quark at fb.com
Wed May 3 21:19:35 EDT 2017


# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1493859818 25200
#      Wed May 03 18:03:38 2017 -0700
# Node ID 5b6943b0ce441e9ce17c45090730304bec944bd4
# Parent  7bfa6bc376e3dd504276e324545913af511cf4a6
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 5b6943b0ce44
annotate: use fctx.isbinary

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -453,5 +453,5 @@ def annotate(ui, repo, *pats, **opts):
     for abs in ctx.walk(m):
         fctx = ctx[abs]
-        if not opts.get('text') and util.binary(fctx.data()):
+        if not opts.get('text') and fctx.isbinary():
             fm.plain(_("%s: binary file\n") % ((pats and m.rel(abs)) or abs))
             continue


More information about the Mercurial-devel mailing list