gpt4 book ai didi

Mercurial - 如何推送未完成的分支?

转载 作者:行者123 更新时间:2023-12-02 23:50:38 25 4
gpt4 key购买 nike

我们将所有来自 CVS 的内容都转换为 Mercurial,到目前为止一切顺利。我们今天遇到的一个问题就是这种情况。

在迁移到 Mercurial 之前,我不久前有一些未决的更改,这些功能已经启动,后来由于各种原因被推迟。很可能其他人会在几个月后从我中断的地方接续完成这些功能。

克隆新的 Mercurial 存储库后,我创建了单独的分支来隔离这些功能。

它给我留下了这样的东西(编造的转速)

hg update default
hg branch feature1
hg commit -m "Description of what I was doing in feature1"
hg update default
hg branch feature2
hg commit -m "Description of what I was doing feature2" (my tip is now here)
hg update default
hg push -f (to force the creation of my new branches, w/o affecting default, I haven't merged them)

在此期间,团队一直在工作并推送到我们的中央存储库,因此默认分支是 rev 40(提示)

现在我的 push -f 工作正常,但定位(提示)到我的最新更改 -> 50:feature3 (提示)。我希望该提示保留在中央存储库中的默认状态,并且只需将我的分支放在那里,以便有人随时可以拿起它们。当我使用 hgwebdir 时,该图看起来也很有趣,所以我很确定这是错误的方法。

我该怎么做?我应该先关闭分行吗?提示实际上很重要还是只是元数据。

最佳答案

tip 始终是添加到存储库的最新变更集。来自hg help revs:

The reserved name "tip" is a special tag that always identifies the most recent revision.

只要默认分支的头是您所期望的,就可以了。无需关闭分支(但如果您的 Mercurial 版本足够新以支持它,最好使用 hg push --new-branch )。

关于Mercurial - 如何推送未完成的分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3894169/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com