Help. I've screwed up my repo again, and I have no idea how.

Rob Landley rob at landley.net
Wed Nov 1 21:33:53 CST 2006


On Wednesday 01 November 2006 10:00 pm, Rob Landley wrote:
> Sigh.  I wanted to spend tonight working on my project (toybox).  Instead I 
> spend it fighting Mercurial.

One little thing about the tutorial:

http://www.selenic.com/mercurial/wiki/index.cgi/TutorialConflict

If you don't notice you've accidentally split your repository into two heads 
(and still have now idea how it happened), and you're trying to merge the 
result, if your working directory already has a copy of the file that doesn't 
match either head, mercurial won't bring up a merge tool, it'll balk with no 
real explanation.

What you have to do is move your updated copies of every file somewhere else 
(and it'll only complain about them one at a time, so get used to typing "hg 
merge" repeatedly), and then when you're done and you do an hg commit with a 
message about putting the two captain kirks back together in the transporter, 
then move all your .bak files back to where they go and _now_ you can check 
them in.

This was not obvious.  I still want to know how I accidentally created a new 
head, how to tell that I've done it without explicitly checking for it, and 
how to avoid doing it again without meaning to.

Rob
-- 
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery


More information about the Mercurial mailing list