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

标签 mercurial branch repository

我们将所有来自 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/

相关文章:

java - Maven 在远程存储库的特定版本中找到具有传递依赖性的依赖项

Mercurial - 在克隆时克隆另一个 repo

mercurial - hg标签和hg书签有什么区别?

git merge命令使用

tfs - Team Foundation Server在分支之间切换

svn - 复制 SVN 存储库

git - 如何创建现有存储库的 gitsubtree?

netbeans - 使用 Mercurial 和 Netbeans 组织工作流程(+ bitbucket.org?)

mercurial - 如何使用 MacOSx 在 Mercurial 中提交和推送项目

git - 如何将我的 Git 'master' 分支重命名为 'release'?