Case folding collision in Mercurial (WinXP)
mpm at selenic.com
Tue Jun 24 15:53:35 CDT 2008
On Tue, 2008-06-24 at 12:03 -0700, Dan Craft wrote:
> > I'm not quite clear what
> > you're trying to do, but you should be able to
> > 'manually revert' by either cloning your repo and copying files or using
> > 'hg cat'. Alternately, you can use hg diff to capture your changes,
> > check out an old revision, then apply (most of) the diff.
> Thanks, Matt. A couple more answers will help me on my way.
> Did you mean clone using 'hg clone'?
Yes. Clone -U will skip the checkout.
> What do I lose if I just copy the repository via filesys commands?
> (Once I have this sandbox, I can just try stuff.)
Nothing, provided you copy all the files.
Here's a little trick I came up with:
- make a repo with 'a' and 'A' on Linux
- hg clone -U to Windows (actually Wine in my case)
- cd <repo>
- hg debugsetparents <bad revision>
- hg debugrebuildstate
- hg rm -A A # mark missing file as deleted
- hg ci -m"fix case collision"
- hg manifest tip # confirm that the collision is gone
- hg co -C tip # get a clean checkout
The trick is to use debugsetparents and debugrebuildstate to get a
working directory that thinks its at the revision we can't check out.
Then we record a deletion for the unwanted file. When we commit, commit
will only record the deletion we made via hg rm.
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial