When multiple development teams are working in parallel on the same code base, the normal practice is to:
Create a separate child stream for each feature, based on the parent mainline stream, and isolate it from the rest of the code base.
When the code in a child stream is stable and ready for release, merge it back into the parent stream.
You should use child streams when:
The expected changes are very large and may destabilize the mainline code, cause continuous integration builds to fail, and affect other teams that are working with the mainline.
The development work on a feature may not meet the mainline release date. You should develop it in a separate child stream and only merge the changes into the release baseline when they are completed.
TIP To test the integration between the changes in a mainline (delivered by other child streams) and a child stream, you may want to regularly merge the mainline into the child stream. This enables you to resolve, fix, and test any issues before you merge the child stream into the mainline. The merge operation is then easier and safer.
The following illustration shows a typical parallel development work flow using streams (the steps are described below):
Create a child stream:
Create a new child feature stream based a baseline or a version of the parent mainline stream.
Develop the child stream:
a Create a local work area for the child feature stream.
b Use the Update or Get operations to populate the work area with the contents of the child stream.
c Make changes to the files in the work area.
d If other members of your development team are working on the same child stream, fetch their latest changes from the repository to the work area. Resolve conflicts, build, and test the changes.
e Deliver your changes to the child feature stream.
Merge the mainline into the child stream:
If the mainline stream is being updated in parallel by other teams, regularly merge the changes from the mainline into the child stream:
a Create a temporary local work area for the merge operation.
b Use the Update or Get operations to populate the work area with the content of the child stream.
c Invoke the Merge wizard for the work area and select the mainline stream as the source and the child stream as the target of the merge operation.
d After you have successfully merged the mainline stream changes into the local work area, build and test the code.
e Deliver the changes to the child stream.
For more details about merging see Merging Changes across Streams.
Merge the child stream into the mainline:
When the child stream changes are ready to be merged into the mainline, perform the merge described above in the opposite direction:
a Create a temporary work area for the merge operation.
b Use the Update or Get operations to populate the work area with the content of the mainline stream.
c Invoke the Merge wizard for the work area and select the child stream as the source and the mainline stream as the target of the merge operation.
d After you have successfully merged the child stream into the mainline, build and test the code.
e Deliver the changes to the mainline stream.
Next steps:
After the child stream has been delivered successfully to the mainline you can either:
Continue to develop source code based on the child stream.
Switch to another feature, project or release, and create a new child stream. You can optionally lock or delete previous child streams.