On Mon, 2006-01-30 at 07:36 -0500, Ethan Blanton wrote:
> This is precisely why Yury is correct.  Because, on many systems, \r
> and \n have _different meanings_, they should be properly and
> reversibly preserved even in text files.  What Yury is saying, if I
> understand it correctly, is that the following file:
> 
> Now is the time\rfor all good\nmen to come to the aid\rof their country.\n
> 
> Would be, after a checkout and checkin with a hook like Yury's:
> 
> Now is the time\nfor all good\nmen to come to the aid\nof their country.\n
> 
> This is clearly *not* what one would expect, given the contents of
> Yury's hook, binary or not-binary.  Preserving binary files without
> conversion is an orthogonal problem.  In this case, the problem
> happened to present itself in binary files, but it would seem to me to
> be a problem for text files which take advantage of the semantics of
> \r and \n, as well.
> 
> Yury, please correct me if I've misunderstood the situation.
> 

Ethan, you're perfectly right. One more example is a text file with
no-eol-at-eof. In current implementation checkin->checkout processes the
file is fed through split_lines(), join_lines() which results in adding
eol-at-eof. So this is another surprise for the user. 

(I'm taking purely real life example: that's what I did -- I needed to
commit a patch sent by a windows developer, so I decided to checkout
CRLF-ed versions and then apply diff. However, after just making
"monotone co", "monotone status" I see a lot of changed TEXT files.)

> Ethan

Cheers,
-up


_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to