# HG changeset patch # User Jun Wu # Date 2017-05-04 01:02:00 # Node ID 4240be02df79f901b0bd4b249a1acb9f647694c8 # Parent 435a3842ca3a5131f746bb8d2e910ac953fab08e fileset: use fctx.isbinary instead of util.binary(fctx.data()) filectx provides "isbinary" to test if the data is binary. Let's use it. This enables other filectx implementations (like LFS) to override the isbinary test. diff --git a/mercurial/fileset.py b/mercurial/fileset.py --- a/mercurial/fileset.py +++ b/mercurial/fileset.py @@ -256,7 +256,7 @@ def binary(mctx, x): """ # i18n: "binary" is a keyword getargs(x, 0, 0, _("binary takes no arguments")) - return [f for f in mctx.existing() if util.binary(mctx.ctx[f].data())] + return [f for f in mctx.existing() if mctx.ctx[f].isbinary()] @predicate('exec()', callexisting=True) def exec_(mctx, x):