hg diff confused - probably by control char

Christian Ebert blacktrash at gmx.net
Wed May 10 07:14:39 CDT 2006


* Bryan O'Sullivan on Sunday, May 07, 2006 at 21:59:50 -0700:
> On Sun, 2006-05-07 at 19:51 +0200, Christian Ebert wrote:
>> Sorry to ask this again, perhaps the question is too stupid.
> 
> No, it's not a stupid question at all.  You've found a definite bug in
> the diff command.

Further experimenting showed me that the "normal" diff command is
not completely reliable either with control chars.

My guess there is no convention how to handle these cases. In my
example I would have like them displayed "verbatim", like ^M or
\r. But that might cause probs in other areas, apart from the
question of how to implement it. -- I experimented a bit with
mdiff and replacing splitlines(1) with split('\n'), but this
exceeds my capabilities, at least in relation to the amount of
time I can afford at the moment.

> In case you're worried,

How did you guess ;-)

> it's *only* the output of diff that appears to be confused.
> The storage of the data on disk remains correct.

Yup. That's one of the phantastic things with hg, I just cloned
the repo in question for testing, and found out myself.

> For future reference, it may be better to file a bug in cases like this.
> I've already filed http://www.selenic.com/mercurial/bts/issue232

My first thought is always that the bug sits in the sponge I
commonly call my brain. That's why I asked here first.

c
-- 
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>


More information about the Mercurial mailing list