[PATCH] grep: don't print data from binary files for matches (issue2614)
Matt Mackall
mpm at selenic.com
Sun Apr 10 07:41:52 CDT 2011
On Sun, 2011-04-10 at 04:20 +0530, Md. O. Shayan wrote:
> # HG changeset patch
> # User Md. O. Shayan <mdoshayan at gmail.com>
> # Date 1302370997 -19800
> # Node ID 61d2ee13bad0e708828361e138024c5fa78072e8
> # Parent 6cbe250742aac8668aa24afce0bf614c7c1cdc78
> grep: don't print data from binary files for matches (issue2614)
Queued, thanks. But:
> diff -r 6cbe250742aa -r 61d2ee13bad0 tests/test-grep.t
> --- a/tests/test-grep.t Fri Apr 08 14:43:00 2011 +0530
> +++ b/tests/test-grep.t Sat Apr 09 23:13:17 2011 +0530
> @@ -166,3 +166,11 @@
> $ hg grep --all red
> color:3:-:red
> color:1:+:red
> +
> + $ hg init a
> + $ cd a
> + $ cp $TESTDIR/binfile.bin .
> + $ hg add binfile.bin
> + $ hg ci -m 'add binfile.bin'
> + $ hg grep "MaCam" --all
> + binfile.bin:0:+: Binary file matches
This is not actually minimal. You've already got a repository in this
test, you don't need to create a new one.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list