monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: Bug in CRLF conversions


From: Bruce Stephens
Subject: [Monotone-devel] Re: Bug in CRLF conversions
Date: Sun, 29 Jan 2006 14:14:40 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Yury Polyanskiy <address@hidden> writes:

> I think there is a bug in CRLF<->LF conversions or at least unintended
> behavior.
>
> Suppose the following scenario.
>
> function get_linesep_conv(fname)
>               return {"LF", "CRLF"}
> end
>
> I expect to have all files translated from LF to CRLF after checkout
> with this hook. Indeed that happens. However, suppose I have a binary
> file which is (in case of such a dumb hook) fed through line translation
> procedure. Then each occurence of 0x0a *OR* 0x0d is replaced by two
> bytes [0x0d 0x0a]. 
>
> Now if I try to commit the translation procedure is applied backwards.
> But now all occurences of [0x0d 0x0a] are replaced by 0x0a. 
>
> Overall I got all 0x0d's translated into 0x0a's. And this will be
> committed to database and eventually ruin everyone else's binaries as
> well.

My first thought is that monotone shouldn't be using this hook at all
for binary files, should it?

[...]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]