Solved

Case folding collision in Mercurial

Posted on 2008-06-20
4
3,014 Views
Last Modified: 2013-12-17
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
0
Comment
Question by:DCraft99
  • 2
4 Comments
 

Author Comment

by:DCraft99
ID: 21868890
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
 

Accepted Solution

by:
DCraft99 earned 0 total points
ID: 21870272
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
Viewers will learn how to use the Hootsuite Dashboard.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now