On Windows, it is currently 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:

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:

Now hg st should show the troublesome file in state 'R' and all other files in state '!'. Now we can check in our fix:

To get all our files back, we just check out again: