分布式源代码管理 - 推送个人变更集 [英] Distributed Source Control - pushing individual changesets

查看:85
本文介绍了分布式源代码管理 - 推送个人变更集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

处理一些棘手的问题,希望得到社区的帮助。基本上,我们的开发团队分成两个团队,可以说红色和蓝色。

3回购:

1:主人< br>
2:红色>>克隆主人

3:蓝色>>主人克隆

每个开发者都克隆红色或蓝色在他们工作的地方机器上。

两个团队都在为我们的主要应用程序开展各种工作。每个团队都有我们共享的主存储库的克隆,他们正在应用其变更集。变更集在这个级别进行了验证,此时他们已准备好被推入Master。



为简化起见,可以说开发者A和B都在红队。因此,当开发人员A推动变更集1,然后开发人员B推动变更集2时,问题就出现了。然后变更集1被验证并准备好进入主人,但变更集2不是。

我希望尽快将变更集1推送给Master,而不是等待验证变更为2,尤其是因为可以在此期间引入变更集3。 / p>

我们现在使用的是mercurial,我喜欢它 - 如果我想要做的工作流会更容易,我会愿意切换到git。



我在想这个错吗?我很感激帮助。

解决方案

在具体情况下,您正在描述:


我希望尽快将更改集1推送到主b $ b,而不是等待
验证更改集2,
,尤其是因为更改集3可能是
在此期间推出。


您需要做的是 hg push -r cset1 其中 cset1 是所需cset的修订号或节点散列。



当您使用 -r 它会推送更改及其所有祖先,因此您可以推送更改集1而不推送changeset2,但不更改集2而不推送更改集1



如果您需要将它们按顺序排列(两个但不是一个),那么您使用TransplantExtension进行樱桃采摘,但只要您去为了您有一个简单的选择。



(请注意避免二b没有一个的情况下,最好的计划是让任何写过功能二的人首先执行 hg update zero 。这样,两人和一人将是兄弟姐妹(两个孩子都是零),而不是亲子,这更自然地反映了他们的真实关系,如果他们确实是可分离的特征。这可以通过分支来显式完成,但是严格使用changeset parentage也是一种非常有效的操作模式。)


Working on a bit of a sticky problem and was hoping for some help from the community. Basically, our dev team is split up into two teams, lets say "Red" and "Blue"

3 repos:
1: Master
2: Red >> Clone of master
3: Blue >> Clone of master

Each developer is cloning red or blue on their local machine where they are working.

Both teams are working on various tasks for our main application. Each team has a clone of our Shared "Master" Repository on which they are applying their changesets. The changesets are verified at that level, at which point they are ready to be pushed into the Master.

To simplify, lets say developer A and B are both on Red team.

So the problem comes when developer A pushes changeset 1, then developer B pushes changeset 2. Then changeset 1 is verified and ready to go into Master but changeset 2 is not.

I want to push changeset 1 to Master as soon as possible, and not wait for verification to changeset 2, especially since changeset 3 could be being introduced in the meantime.

We're currently using mercurial and I like it - I would be willing to switch to git if the workflow for what I want to do would be easier.

Am i thinking about this wrong? I appreciate the help.

解决方案

In the specific case you're describing:

I want to push changeset 1 to Master as soon as possible, and not wait for verification to changeset 2, especially since changeset 3 could be being introduced in the meantime.

all you need to do is hg push -r cset1 where cset1 is the revision number or node hash of the cset you want.

When you push with -r it pushes that changes and all of its ancestors, so you can push changeset 1 without pushing changeset2, but not changeset 2 without pushing changeset 1.

If you need to push them out of order (two but not one) then you're into cherry picking with the TransplantExtension, but so long as you're going in order you've got an easy option.

(Note that to avoid the "two but not one" scenario the best plan is to have whomever wrote feature two do a hg update zero first. That way two and one will be siblings (both kids of zero) rather than parent-child, which more naturally reflects their true relationship, if indeed they are separable features. This can be done explicitly with branching, but doing it strictly with changeset parentage is a perfectly valid mode of operation too.)

这篇关于分布式源代码管理 - 推送个人变更集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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