To fully appreciate the power of streams, let's review some important codeline concepts and terminology.
The term codeline commonly describes a group of files that evolve together over the life of the software application or application component. A codeline might include source code, build scripts, images, compiled code, and other files that are required to create the application.
The concept of a codeline, however, has context outside of a software development project as well.
A codeline can describe almost any set of files that evolve together in almost any type of project.
As you add objects to a project, they become part of the codeline.
As you modify and save objects, the modifications are incorporated into the codeline.
At the end of the project, the codeline typically contains all the objects necessary to generate the final product.
For the purpose of this discussion, we use the terms codeline and branch synonymously. You can think of a stream as a codeline with some additional features and functionality.
You typically illustrate classic codeline or branch hierarchies using horizontal lines to depict branches, with time moving forward from left to right. Perforce displays streams in a Stream Graph using rounded rectangles, each rectangle representing a separate stream.
Branching is the process of creating a new branch from an existing branch. In the streams world, you branch by defining a new stream.
A stream is a child of the stream from which it was branched. Conversely, the source for a stream is the parent of the stream. A stream that has no parent is called the mainline.
When you create a new stream that is a child of an existing stream, the child stream, by default, automatically inherits some of the properties of the parent stream, which includes the definition of the scope of files contained in the stream.
Integration is the process of propagating changes from one stream to another. When you integrate, you might merge the changes in the source stream into the existing files in the target stream or copy the files from the source stream to replace the files in the target stream.
The Stream Graph displays stream relationships and the workflow required to integrate changes across streams.
A stream's type helps you understand how a stream is used. In streams, there are three, predefined stream types: mainline, development, and release. You use release streams to refine and publish the final product while others continue development on future versions in the mainline. You use development streams to work on new product features and functionality without destabilizing the mainline. For example, you would use a development stream to work on new product features and a release stream to hold the files associated with a specific product release.
A streams's type might also establish the relative stability of a stream.
To illustrate some of these concepts let's look at a common codeline model called the mainline model as it would appear using streams.
The general strategy involves:
Copying the non-stream mainline to a stream mainline
Performing your active development in the stream mainline or into related child streams
Merging bug fixes and post-release changes from the non-stream mainline to the stream mainline
Branching new release streams from the stream mainline