Differences between revisions 2 and 8 (spanning 6 versions)
Revision 2 as of 2008-06-25 14:06:48
Size: 892
Editor: abuehl
Comment: cat
Revision 8 as of 2012-06-29 14:46:36
Size: 1113
Editor: 212
Comment: Removing shortcuts so commands are easier to read.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
On Windows, it is currently possible to introduce case collisions in the repo that prevent you from checking out a repository. 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.
Line 7: Line 7:
 * hg clone -U repo repair  * hg clone --noupdate repo repair
Line 12: Line 12:
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:
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:
Line 15: Line 14:
 * hg rm -A <file causing the collision>  * hg remove --after <file causing the collision>
Line 17: Line 16:
Now hg st should show the troublesome file in state 'R' and all other files in state '!'. Now we can check in our fix: Now ''hg status'' should show the troublesome file in state 'R' and all other files in state '!'. Now we can check in our fix:
Line 19: Line 18:
 * hg ci -m"fix case collision"   * hg commit --message "fix case collision"
Line 23: Line 22:
 * hg co tip  * hg update tip

Or you can install the CaseFoldExtension and use this:

 * hg up --fold

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

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 --noupdate 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 remove --after <file causing the collision>

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

  • hg commit --message "fix case collision"

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

  • hg update 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)