如何合并两个或多个流 [英] How to merge two or more streams

查看:640
本文介绍了如何合并两个或多个流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有两个开发流(分别称为Stream1,Stream2),并且我想将这两个流合并为一个流.

If I have two streams(called Stream1, Stream2) of development and I want to merge these two streams into one stream.

这是我目前的操作方式:

This is currently how I do it :

  1. 创建一个新的Stream-Stream3. Stream 3将包含Stream1和amp; 2的合并. Stream2
  2. 从Stream3创建一个新的存储库工作空间(称为workspace1)
  3. 将工作区1的流目标设置为Stream1
  4. 在待定更改"中,Stream1中可用但Stream2中不可用的所有更改集现在应显示为可以传递给Stream3的更改集

这是合并2个或更多流的最佳实践,还是有更优雅的方法?

Is this best practice for merging 2 or more streams or is there more elegant method?

推荐答案

创建新流???不用.

打开回购工作区时,将有一个名为流目标"的部分,该部分包含在Stream中(特征为默认").

When you open a repo workspace, you have a section called "Flow targets", which contains by your Stream (characterized as "Default").

向其中添加流源(要合并的流),将其设置为当前",然后在待更改"视图中将看到传入"部分,其中包含所有更改集或基准来自该源流.

Add to it the Stream source (the Stream from which you want to merge), set it as "current", and you will see in your "Pending changes" view an "Incoming" section with all the change sets or baselines coming from that source Stream.

这个想法是让您接受这些更改集,将它们加载到本地工作区中并进行测试(编译和测试),然后交付给您的默认流.

The idea is for you to accept those change set, load them in your local workspace and test them (compilation and test), and then deliver them back to your default stream.

在接受"阶段进行合并(自动或发生冲突时手动进行).
此线程中所述:

The "Accept" phase is where the merge occurs (automatically, or manually if conflicts).
As mentioned in this thread:

RTC中的合并算法在逻辑上与ClearCase中的相​​同,即,给定配置(流,工作区),该配置选择给定文件的不同版本,找到两个版本的共同祖先,然后执行三向合并.
更改工作空间的流目标"只是RTC的一种方法,它使您可以指定要合并到工作空间中的分支(流)(cleartool findmerge具有相同的灵活性).
请注意,ClearCase和RTC使用不同的公共祖先算法.

The merge algorithm in RTC is logically the same as is found in ClearCase, i.e., given a configuration (stream, workspace) that selects a different version of a given file, find the common ancestor of the two versions, and then do a 3-way merge.
Changing the "flow target" of a workspace is just RTC's way of letting you specify what branch (stream) you want to merge into your workspace (cleartool findmerge gives you the same flexibility).
Note that ClearCase and RTC use a different common ancestor algorithm.

最后一步假设您返回流目标"部分,并将默认流设置为当前".

The last step supposes you go back to your "Flow target" section, and set back as "current" the default Stream.

相对于此,我更喜欢这种工作流程:

I prefer this workflow to this one:

此处Brent将目标流设置为当前流,以便提供合并结果.这是一个替代的工作流程,也在"如何在Rational Team Concert 3.0.1中保持流的顺畅流动".

Here Brent would set as current the destination stream in order to deliver the result of the merge. That is an alternative workflow, also described in "How to keep your streams flowing smoothly in Rational Team Concert 3.0.1".

这篇关于如何合并两个或多个流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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