删除多个头

发布于 2024-12-05 11:20:03 字数 967 浏览 0 评论 0原文

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:   9: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)

你怎么看我有一根树枝和四个头。 当我尝试引入 Eclipse Mercurial 插件时,它会返回有关多个头的消息,并让我进行变基或合并。然后我什么都不懂就关掉了。 我想我需要一些东西来删除这个头。如果有人可以向我解释这一点并展示如何在 Eclipse 插件中执行此操作,那就太好了,但也感谢其他帮助。

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:   9: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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

北城孤痞 2024-12-12 11:20:03

删除多余头的最安全方法是创建一个新的克隆,使用 -r 只抓取您想要的头部:

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

这只会将 aa6af82c5458 及其祖先移动到新克隆,而将旧头部保留在其中编译器备份。您稍后可以随时hg pull它们,或者直接删除备份(丢失数据)。

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).

烟─花易冷 2024-12-12 11:20:03

Mercurial 有一个完整的 wiki 页面专门讨论多头

我强烈建议您在继续执行您明显的行动之前先阅读它。

Fog Creek 的人们提供了一些更友好的材料< /strong>

您可能会考虑与他们合作,因为听起来您可能需要一些支持。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文