Differences between revisions 5 and 6
Revision 5 as of 2009-05-19 19:31:07
Size: 1049
Editor: localhost
Comment: converted to 1.6 markup
Revision 6 as of 2009-12-14 19:13:01
Size: 1051
Editor: BenoitAllard
Comment: correct link
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:
 * hg ci -m"fix case collision"   * hg ci -m"fix case collision"
Line 25: Line 25:
Or you can install the CaseFoldPlugin and use this: Or you can install the CaseFoldExtension and use this:

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:

  • 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:

  • hg co tip

Or you can install the CaseFoldExtension and use this:

  • hg up --fold

Reference: http://selenic.com/pipermail/mercurial/2008-June/019921.html


CategoryTipsAndTricks

FixingCaseCollisions (last edited 2012-06-29 14:46:36 by 212)