Mercurial case-folding BIG BUG

Gé Weijers ge at weijers.org
Sat Feb 2 07:38:37 CST 2008


There was a long mix of discussions and rants on the Git mailing list  
about case folding and the somewhat pathological behavior of the  
MacOS X VFS layer which may be relevant here.

A bit of background: if your repository includes both the files foo.c  
and FOO.c one of them gets clobbered on checkout on a case folding  
system. On MacOS X it gets even stranger, if your repository contains  
a file name with diacritical marks you end up with the OS  
'normalizing' the Unicode. 'Märchen.txt' has two different encodings,  
the letter 'ä' can be encoded as either a single Unicode character,  
or as the letter 'a' followed by a combining diaeresis. The MacOS X  
VFS accepts both, but silently changes the name to the second  
representation. You could compare this to a hypothetical file system  
that does not preserve case.

This does not cause problems if you create the file on Mac OS X, but  
if you create in on Linux or Windows you end up with the first  
representation in your manifest, and 'hg status' not being able to  
find the file after checkout. If your repository contains both  
encodings you end up with a similar situation as with the FOO.c/foo.c  
issue.

It this a 'BIG BUG'? I would call it an annoyance, because I can  
'fix' the repository on Linux or FreeBSD, where the OS treats  
anything without a null character as a valid file name.

People whose native language really requires diacritical marks, or  
who use non-roman alphabets may get in trouble often enough for it to  
be a problem.

Gé


On Feb 1, 2008, at 8:12 AM, Matt Mackall wrote:

> [cc:ed to the list]
>
> On Thu, 2008-01-31 at 22:19 -0800, fpedron at email.it wrote:
>> Hi,
>>
>> I'm a new Mercurial & TortoiseHG user and I had a problem with case
>> folding collisions.
>> I started a new (important) project with Mercurial and everything
>> seems to be good.
>>
>> I committed a lot of revision, I tested the HG repository and HG told
>> me that everything was ok, but ... When I tryed to back to an old
>> revision I reached a case-folding problem.
>
> No useful description of problem -> not likely to get any help.
>
>> I read the help command line, the manual and finally I searched for
>> something to help me about this problem.
>>
>> The best discussion I found was
>> "http://www.nabble.com/feature-or-bug--td14591488.html" and their
>> solution is to checkout  the repository on a Linux machine, rename  
>> the
>> file (or some file), commit the modified file. I can't read anymore
>> the old history on the Windows machine.
>>
>> WHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAT???? 
>> ??
>>
>> I'm only a stupid Windows user and Linux users hate Windows and  
>> stupid
>> Windows users. I know it.
>>
>> I've not a Linux machine. I have to user Windows because a lot of
>> program work ONLY under such SO and I can't choose a better solution.
>>
>> I don't understand how can Mercurial development community accept to
>> confuse Windows users: until HG 0.93 everything seems ok for them,  
>> but
>> now they can't use it anymore because it's very DANGEROUS.
>>
>> Please, consider to remove the case-folding BIG BUG or remove Windows
>> from the supported SO.
>
> If you had spent the space above on describing your problem rather  
> than
> ranting, someone might have been able to help you.
>
> -- 
> Mathematics is the supreme nostalgia of our time.
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial

--
Gé Weijers
ge at weijers.org






More information about the Mercurial mailing list