Parallel development using streams
When teams are working in parallel on the same code base, you normally create a separate child stream for each feature, based on the mainline stream, and isolate it from the rest of the code base. When the code in a child stream is ready for release, merge it back into the parent stream.
Child streams
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.
Parallel development workflow
The following diagram illustrates a typical parallel development workflow using streams:
The following steps describe the typical workflow using streams:
-
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.
-
Create a local work area for the child feature stream.
-
Use the Update or Get operations to populate the work area with the contents of the child stream.
-
Make changes to the files in the work area.
-
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.
-
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:
-
Create a temporary local work area for the merge operation.
-
Use the Update or Get operations to populate the work area with the content of the child stream.
-
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.
-
After you have successfully merged the mainline stream changes into the local work area, build and test the code.
-
Deliver the changes to the child stream.
For details about merging, see the following topics:
Web client: Merge changes across streams Desktop client: Merge 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:
-
Create a temporary work area for the merge operation.
-
Use the Update or Get operations to populate the work area with the content of the mainline stream.
-
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.
-
After you have successfully merged the child stream into the mainline, build and test the code.
-
Deliver the changes to the mainline stream.
-
-
Next steps.
After the child stream has been delivered successfully to the mainline:
-
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.
-
See also: