I tried to clone an HG repo today and saw this error:
luther$ hg clone Project
updating working directory
abort: case-folding collision between pdf.png and PDF.png
While this could have been caused by a Windows machine I very much doubt it as it is part of an iPhone project. Instead, I'm sure I renamed a file with lowercase 'pdf' and checked it in as
this post alludes to.
It wasn't too hard to fix - Mercurial walked me through the process
here:
On Windows, it is currently (before Mercurial 1.1) possible to introduce case collisions in the repo that prevent you from checking out a repository.
One way to repair such a repository is to check it out on a case-sensitive Unix system, remove the problematic file, and commit it again.
If that's not possible, you can do the following:
- hg clone -U repo repair
- cd repair
- hg debugsetparents <bad revision>
- hg debugrebuildstate
At this point, Mercurial will think you have the bad revision checked out and all the files are missing (status '!'). To fix the repo, we simply have to do:
- hg rm -A <file causing the collision>
Now hg st should show the troublesome file in state 'R' and all other files in state '!'. Now we can check in our fix:
- hg ci -m "fix case collision"
To get all our files back, we just check out again:
Or you can install the CaseFoldExtension and use this:
0 comments:
Post a Comment