Case folding collision in Mercurial

Mercurial is reporting "abort: case-folding collision between restaurants/Calypsoflavors/ObfIdMap.txt and restaurants/CalypsoFlavors/ObfIdMap.txt" during a revert.  Under .hg/store/data/restaurants, it has, indeed, established two directories "_calypso_flavors" and "_calypsoflavors", representing "CalypsoFlavors" and "Calypsoflavors".  And it has put "_obf_id_map.txt.i" files in both of them.

I am on WinXP.  I have not changed the capitalization of the CalypsoFlavors directory.  (It's been around long before I even started using Mercurial.)  I have only this single machine, so there is no interaction with any other filesys.  I have had difficulty using Mercurial from within NetBeans so now use it just outside.  The above conflict may have resulted from either place.

The revert I was attempting to do was at a place in the dir hierarchy completely distinct from the case collision, though in the same repository and workspace.  It appears the collision prohibits me from accessing elements beyond just the collision-affected directories.

How do I fix this?  I am a Mercurial newbie, though I have used other vers control systems extensively.  I read the RedBook cover to cover (excl appendicies) and grock'ed most of the concepts.  Please help me with sufficient details for such a beginner.

There are only a handful of files under the [incorrect] Calypsoflavors dir.  If I could see the content of their particular versions, I guess I could manually merge them into the correct ones, though getting revisions sorted out could be messy.  More importantly, I don't know anything about the interdependencies of data beneath .hg/, and imagine I could quite quickly make a mess.

I searched at Selenic.com for info on case folding collisions but couldn't find any help--mostly stuff about issues using hg across multiple filesys, or on OS X.  There was reference to case collision bugs needing to be fixed, but couldn't find any details.  And, I don't know my way around that site.  

Given I didn't change the name of the directory, I believe Mercurial introduced the collision and then put the same file under both directories.  I can't imagine any [mis]use of the hg commands that should have caused this (modulo bugs).

Thanks,
--Dan
DCraft99Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
DCraft99Connect With a Mentor Author Commented:
The solution was suggested by the following from Matt Mackall at Selenic:

> Here's a little trick I came up with:

> - make a repo with 'a' and 'A' on Linux
> - hg clone -U to Windows (actually Wine in my case)
> - cd <repo>
> - hg debugsetparents <bad revision>
> - hg debugrebuildstate
> - hg rm -A A # mark missing file as deleted
> - hg ci -m"fix case collision"
> - hg manifest tip # confirm that the collision is gone
> - hg co -C tip # get a clean checkout

> The trick is to use debugsetparents and debugrebuildstate to get a
> working directory that thinks its at the revision we can't check out.
> Then we record a deletion for the unwanted file. When we commit, commit
> will only record the deletion we made via hg rm.


See the thread "Case folding collision in Mercurial (WinXP)" at http://www.selenic.com/pipermail/mercurial/2008-June/subject.html.

Please close this question (in case I can't accept this comment as the solution).  Thanks.
0
 
DCraft99Author Commented:
I've also posted on the Mercurial mailing list at http://Selenic.com/mercurial, and am getting some responses there.  I'll post pointers or a solution here if that works out.  --Dan
0
All Courses

From novice to tech pro — start learning today.