I switched awhile ago from SVN to Mercurial and I am loving it.
One pain is if you create a file, check it in, and then later change the case (from ‘a’ to ‘A’ for example) and check that in, when you try and checkout the latest version you will get the error:
“abort: case-folding collision between myFile.m and MyFile.m”
This is one error/abort that doesn’t tell you how to fix it.
After some research I have found the following to work.
Note: Notes are in Italic. Items you should replace with your own info are in Italic and Bold.
- hg clone https://username@myrepo-location.com/hg/index.cgi/MyProgram
- cd MyProgram
- hg debugsetparents 11 (the revision number you need to fix)
- hg debugrebuildstate
- hg rm -A MyFile.m (mark missing file as deleted)
- hg ci -m “fix case collision”
- hg manifest tip (confirm that the collision is gone)
- cd ..
- rm -rf MyProgram
- hg clone https://username@myrepo-location.com/hg/index.cgi/MyProgram
You should now have a clean clone of the repo.
Note: It is possible that after doing the above you will be presented with the same error, but on a different file (if there are multiple conflicts). If that happens just do the above again for each conflict.


January 23, 2009
Thanks Dallas, you saved me some hours.
This is a very bad behavior of Mercurial.
Note: If you need to fix an older Revision you want to update to,
push the needed Revision to an Repo and fix it there (discriped above), then clean the old one and pull the changes from the fixed Repo.
Keep it up!