Mixed up directory name case

Jensen, Aaron ajensen at webmd.net
Mon Apr 2 17:30:32 UTC 2012


>> You'll know you're in this camp when you get an error about 
>> case-folding collisions when you try to update to the tip of your branch.

>Now I get the above when I try to clone our main repository. I don't understand 
>how we can have case collisions, as all our repositories are on Windows! Shouldn't 
> this type of collision be impossible with only one type of file-system?!?

Nope.  Mercurial is case-sensitive internally.  We've gotten case collisions when someone added a file by typing a filename at the command line whose case was different than the file system.  Older versions of Mercurial used the typed case.  Older versions also had trouble merging branches with files of different cases.  We're on 2.1.1 now, and we haven't seen a case issue in a few weeks.

From my experience, the Windows and .NET file system APIs will always use the case of the path it receives instead of the actual case in the file system.  You have to do extra work to convert a path to its actual case.  Because of this, we've seen the VisualHG Visual Studio extension introduce case collisions because the case of files in solution (.sln) and project (.csproj) files didn't match the file system.  We have spent days and days investigating, resolving, and preventing case collisions.

 
> I tried following the steps outlined in above link, but I can't figure out how to find 
> this "bad revision". Which one is that anyway, the original one that created the 
> badly named lower case "portal/ui.js" or the later one where it was replaced by 
> the correctly named "Portal/ui.js"?

It's usually the tip of the branch you're trying to clone or update to.  What you have to do is clone without getting a working directory:

	> hg clone -U

Then, follow the instructions at http://mercurial.selenic.com/wiki/FixingCaseCollisions.

Make plans to update to the latest version of Mercurial as soon as possible (2.1.2 as of this writing).

     <:> Aaron


More information about the Mercurial mailing list