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

Brendan Cully brendan at kublai.com
Wed Nov 1 22:43:19 CST 2006


I really don't know how you got your repository into the state it was  
in (revisions 10 and 11 are not just branches, they are completely  
unrelated to the rest of your repo), but there is a simpler way to  
fix it:

hg clone toybox tmp
cd tmp
hg merge
hg commit -m'merge'
hg pull ../tmp
cp ../tmp/.hg/dirstate .hg
rm -r ../tmp

copying the dirstate is a little grody, but should work.

On 1-Nov-06, at 7:33 PM, Rob Landley wrote:

> 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
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial



More information about the Mercurial mailing list