Solved

Case folding collision in Mercurial

Posted on 2008-06-20
4
3,027 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

805 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