Mercurial > hg-stable
changeset 32187:4240be02df79
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.
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 03 May 2017 18:02:00 -0700 |
parents | 435a3842ca3a |
children | 347ab2d47463 |
files | mercurial/fileset.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/fileset.py Wed May 03 14:07:14 2017 -0700 +++ b/mercurial/fileset.py Wed May 03 18:02:00 2017 -0700 @@ -256,7 +256,7 @@ """ # 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):