[PATCH 5 of 5] keyword: check for '\0' in entire data before acting

Christian Ebert blacktrash at gmx.net
Mon Apr 7 14:25:58 CDT 2008


* Matt Mackall on Monday, April 07, 2008 at 13:26:54 -0500
> On Mon, 2008-04-07 at 19:10 +0200, Christian Ebert wrote:
>> # HG changeset patch
>> # User Christian Ebert <blacktrash at gmx.net>
>> # Date 1207586716 -7200
>> # Node ID f4e983f6f4bb5cdbfc0a5ea336133e1588f1dc36
>> # Parent  84f1bb1bcfc873a31ae97b73b9a2a4711234f92b
>> keyword: check for '\0' in entire data before acting
>> 
>> util.binary might not be safe enough, as it fails eg. on certain
>> pdf files (issue1066).
> 
> *boggle*
> 
> How about we just fix util.binary instead of redefining it everywhere
> it's used one by one?

Fine. I just don't know enough about the speed impact. And for
diff, patch, merge :4096 worked for me ... so far.

OTOH, it looks awful, and is awfully slow for hgweb.

Again,
<http://www.selenic.com/mercurial/wiki/index.cgi/BinaryFiles>
says, it's my own fault if I track such a file ;)

bug or feature ;)

c
-- 
Nichts gibt so sehr das Gefühl der Unendlichkeit als wie die Dummheit
--Ödön von Horváth


More information about the Mercurial-devel mailing list