开发者

Delete multiple heads

C:\Users\Itu\workspace\Compiler>hg branches
default                       13:aa6af82c5458

C:\Users\Itu\workspace\Compiler>hg heads
changeset:   13:aa6af82c5458
tag:         tip
user:        Itun
date:        Sun Sep 18 22:27:06 2011 +0400
summary:     Update 1.0.0.2

changeset:   开发者_如何学Go9:d36e5ac454b1
parent:      -1:000000000000
user:        Itu
date:        Sun Sep 18 06:50:25 2011 +0400
summary:     New PR

changeset:   8:758cd394d82a
user:        Itun
date:        Sun Sep 18 06:48:17 2011 +0400
summary:     asdasd

changeset:   4:c4c981b4ff43
user:        Itun
date:        Sun Sep 18 03:31:58 2011 +0400
summary:     Update
C:\Users\Itu\workspace\Compiler>hg merge
abort: branch 'default' has 4 heads - please merge with an explicit rev
(run 'hg heads .' to see heads)

How you can see I have the one branch and 4 heads. When I try to pull in my eclipse mercurial plugin, it returns me message about multiple heads and offers me to rebase or merge. Then I did not understand anything and closed it. I think I need something to delete this heads. It would be great if somebody could explain me this and show how to do this in the eclipse plugin, but other help is appreciated.


The safest way to remove the extra heads is to make a new clone, grabbing just the head you want with -r:

cd C:\Users\Itu\workspace
mv Compiler Compiler-backup
hg clone -r aa6af82c5458 Compiler-backup Compiler 

This will move just aa6af82c5458 and its ancestors to the new clone, leaving the old heads in Compiler-backup. You can always hg pull them over later, or just delete the backup (losing your data).


Mercurial has an entire wiki page devoted to the topic of multiple heads.

I highly suggest reading it before proceeding on your apparent course of action.

The folks at Fog Creek have provided some friendlier material.

You might consider working with them, since it sounds like you might need some support.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜