Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Closing a branch/head in mercurial

Tags:

mercurial

 >hg branches
 default                      210:87d8059250ce

and two heads

hg heads
changeset:   1:87d8059250ce
tag:         tip
user:        me
date:        Tue Apr 12 18:33:24 2011 -0700
summary:     old one

changeset:   2:fa5abf8b578a
user:        me
date:        Tue Apr 12 18:13:19 2011 -0700
summary:     new one

I would like to close head 1 and only use head 2. how do I do this? How can I find out which branch this is associated with?

I've seen this method:

 hg up -r 1
 hg ci --close-branch

but then when I go to push, it complains "did you forget to merge? use push -f to force". I'm not sure why it would ask me that, because I would like to override the changes I just pulled with this new head... rev 2.

Let me know how to do this! thank you!!!

like image 708
mtay Avatar asked Oct 11 '22 07:10

mtay


1 Answers

this answered it for me. thanks Mercurial: beheading a head

like image 137
mtay Avatar answered Jan 01 '23 09:01

mtay