适用于约15个开发人员的Mercurial工作流程-我们应该使用命名分支吗? [英] Mercurial workflow for ~15 developers - Should we use named branches?

查看:88
本文介绍了适用于约15个开发人员的Mercurial工作流程-我们应该使用命名分支吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队刚刚开始使用Mercurial和一个中央存储库.哈德森(Hudson)构建了默认"分支的提示-这基本上是我们的主线.我们对旧的VCS实行了签入政策,必须先进行代码审查,测试等工作,然后才能签入主线.

My team's just starting out with Mercurial and a central repository. We have Hudson building the tip of the "default" branch - which is basically our mainline. We had a check-in policy with our old VCS that code reviews, testing, etc. must be done before you check-in to the mainline.

因此,假设您正在使用特征X.您正在处理某些东西,将其基于默认",然后提交部分特征作为检查点.在本地,您的默认"已损坏-您尚未与任何人共享它,但是如果要进行推送,那么现在主线中的代码已损坏.

So, let's say you are working on feature X. You work on some stuff, basing it off of "default", and then you commit a partial feature as a checkpoint. Locally your "default" is now broken -- you haven't shared it with anyone yet, but if you were to do a push, well now you've got broken code in mainline.

即使您等到所有问题都解决后再进行推送,似乎在某些情况下(例如,同时处理两件事),您也需要推送一些更改,但不是全部.

Even if you wait to push until you've got it all sorted out, it seems like there are situations (e.g. working on two things at once) where you'd need to push some changes but not all.

此外,如果您签入所有检查点更改,则将在主线中生成一些修订版本,而在主线中则存在一些未构建版本.

Additionally, if you check in all your checkpoint changes, then there will be some revisions in mainline that build, and others in mainline that don't build.

我们已经开始使用命名分支-但是我读得越多,我就越认为我们误用了命名分支.

We have started using named branches - but the more reading I do the more I think we're mis-using named branches.

关于如何建立良好的工作流程以使我们能够运行Hudson并保留主线政策的任何建议?

Any suggestions on how to setup a good workflow that allows us to run Hudson and keep our mainline policy?

推荐答案

首先,我强烈建议接下来,您可以仅推送当前分支:

Next, you could push just the current branch: Nudge - A Gentler Version of Push

也许您可以决定每个分支只允许一个头: 32.防止产生多个头部的推动

And maybe you could decide to allow only a head per branch: 32. Prevent a push that would create multiple heads

与命名分支有关的其他SO问题:

Other SO questions related to named branches:

  • Mercurial: Named Branches vs Multiple Repositories
  • Mercurial repository layout for multiple branches

这篇关于适用于约15个开发人员的Mercurial工作流程-我们应该使用命名分支吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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