[PATCH] Let util.binary check entire data for \0 (issue1066)
Christian Ebert
blacktrash at gmx.net
Mon Apr 7 21:58:39 UTC 2008
* Christian Ebert on Monday, April 07, 2008 at 23:10:54 +0200
> # HG changeset patch
oops, should have run some tests first, sorry.
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1207605341 -7200
# Node ID 4acd877a8bb1eaeb30f6e320b904333999df6b5a
# Parent 43d14cbd69b77d84b38c8e46c7d9475da8eff0ba
Let util.binary check entire data for \0 (issue1066)
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -243,8 +243,8 @@
return pipefilter(s, cmd)
def binary(s):
- """return true if a string is binary data using diff's heuristic"""
- if s and '\0' in s[:4096]:
+ """return true if a string is binary data"""
+ if s and '\0' in s:
return True
return False
More information about the Mercurial-devel
mailing list