如何摆脱较老的汞头? [英] How to get rid of older mercurial heads?

查看:150
本文介绍了如何摆脱较老的汞头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我希望您可以从我的I/O中得知如何继续将所有内容合并到最新更新中,而不会丢失所做的更改:

Hi I hope you can from my i/o tell how to proceed to merge everything to the latest update without losing my changes:

$ hg merge
avbryter: grenen 'default' har 4 huvuden - sammanfoga med en specifik rev
(kör 'hg heads .' för att se huvuden)
ubuntu@ubuntu:/media/Lexar/montao$ hg heads
ändring:     192:e571b17295e9
märke:       tip
förälder:    175:f50d4c4461e5
användare:   tekniklas
datum:       Sat Jan 08 04:45:07 2011 +0000
kortfattat:  twitter support added

ändring:     191:9e419ce3e7e1
användare:   tekniklas
datum:       Wed Mar 09 12:56:27 2011 +0000
kortfattat:  adsense maps

ändring:     159:f8d974793b12
förälder:    157:ef1d955b9236
användare:   tekniklas
datum:       Sat Dec 18 17:05:45 2010 +0000
kortfattat:  remove

ändring:     89:008a2ac46b4f
användare:   tekniklas
datum:       Sun Aug 01 07:10:40 2010 +0000
kortfattat:  classifiedsmarket/market/market_ad_preview.html

ubuntu@ubuntu:/media/Lexar/montao$ 

最新版本很好,我想丢掉"那些老头子.

The latest version is good and I want to "lose" the older heads.

更新.进行技巧操作后,这是汞头的最新输出:

UPDATE. After proceeding with the tip this is the latest output from hg heads:

    $ LC_ALL=C hg heads
changeset:   195:fa7d0ec3760d
tag:         tip
user:        tekniklas
date:        Fri Mar 11 06:04:17 2011 +0000
summary:     searchbox

changeset:   192:e571b17295e9
parent:      175:f50d4c4461e5
user:        tekniklas
date:        Sat Jan 08 04:45:07 2011 +0000
summary:     twitter support added

changeset:   159:f8d974793b12
parent:      157:ef1d955b9236
user:        tekniklas
date:        Sat Dec 18 17:05:45 2010 +0000
summary:     remove

changeset:   89:008a2ac46b4f
user:        tekniklas
date:        Sun Aug 01 07:10:40 2010 +0000
summary:     classifiedsmarket/market/market_ad_preview.html

编辑,当前问题状态为:

EDIT, current issue status is:

$ LC_ALL=C hg heads
changeset:   195:fa7d0ec3760d
tag:         tip
user:        tekniklas
date:        Fri Mar 11 06:04:17 2011 +0000
summary:     searchbox

changeset:   192:e571b17295e9
parent:      175:f50d4c4461e5
user:        tekniklas
date:        Sat Jan 08 04:45:07 2011 +0000
summary:     twitter support added

changeset:   159:f8d974793b12
parent:      157:ef1d955b9236
user:        tekniklas
date:        Sat Dec 18 17:05:45 2010 +0000
summary:     remove

changeset:   89:008a2ac46b4f
user:        tekniklas
date:        Sun Aug 01 07:10:40 2010 +0000
summary:     classifiedsmarket/market/market_ad_preview.html

ubuntu@ubuntu:/media/Lexar/montao$ LC_ALL=C hg --config ui.merge=internal:local merge 195
abort: merging with a working directory ancestor has no effect

推荐答案

Mercurial是为您的作品建立永久性的历史,因此它的正常使用方式都不包括摆脱"旧的头脑.

Mercurial is about building a permanent history of your work, so none of its normal usage modes include "getting rid" of old heads.

执行此操作最类似于Mercurial的方法是合并该头部,而不选择任何内容.

The most Mercurial-like way to do this is to merge that head in selecting nothing from it.

hg update tip
hg --config ui.merge=internal:local merge 191 # keep my files

此处中找到.
> 那将消除那个头,从头上什么也没选.

Found here.
That will eliminate that head, selecting nothing from it.

实际上将其从历史记录中删除的其他选项包括:

Other options that actually remove it from history include just doing:

hg clone -r tip myrepo mynewrepo

这会为您带来一个新克隆,其中仅包含您的最新头及其祖先(而不是其兄弟头),如果您愿意,可以用它替换旧的仓库.

Which gets you a new clone that has only your newest head and its ancestors (not its sibling heads) which you can replace your old repo with if you like the result.

如果您购买永久保存的模型(我愿意),那通常就不那么好了;如果其他人已经为您的存储库提供了克隆,那将根本不起作用.

That's generally inferior if you buy into the keep-everything-forever model (I do) and doesn't work at all if other people already have clones fo your repo.

这篇关于如何摆脱较老的汞头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆