Patchwork [2,of,3] annotate: use fctx.isbinary

login
register
mail settings
Submitter Jun Wu
Date May 4, 2017, 1:19 a.m.
Message ID <5b6943b0ce441e9ce17c.1493860775@x1c>
Download mbox | patch
Permalink /patch/20412/
State Accepted
Headers show

Comments

Jun Wu - May 4, 2017, 1:19 a.m.
# HG changeset patch
# User Jun Wu <quark@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

Patch

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