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 :
Is this best practice for merging 2 or more streams or is there more elegant method?
Create a new stream??? No need.
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:
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:
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".