You can configure the stream settings directly in the stream spec using the command line client or through the “create new stream” or “edit stream” dialogs in P4V.

The stream name is independent of the stream root folder name. You can choose to configure the stream name to match the stream root folder name, or, create a name that conveys information about the stream, such as how the stream is used, the stream's association with a product or specific release, the stream owner, and so forth. For example, you might use -- as the pattern for your stream name, such that the name for a development stream created by bruno for version 1.1 of the jam product might look something like dev1.1-jam-bruno.

You might want to consider using different stream and root folder names for streams that are somewhat transient and similar root folder and stream names for streams that are more permanent or long-lived.

Perforce displays the stream name along side the root directory name for each stream listed in the P4V depot and workspace panes as well as in the information returned to the command line client for commands such as p4 streams.

There are three primary stream types: mainline, development and release. You choose a stream type based on how you expect to use the stream. The stream type establishes the default flow of change between the stream and its parent and might also determine the stream's position in the stream hierarchy.

The mainline is the foundation of your stream hierarchy. As a best practice, you should only have one mainline in a stream depot. When you build out a stream hierarchy, you first create a mainline stream which serves as the trunk for other streams in the hierarchy. In terms of the tofu scale, the mainline provides the reference point from which Perforce places more stable release streams and less stable development streams in the Stream Graph.

Perforce displays development streams that are children of the mainline stream below the mainline in the Stream Graph. The default flow of change between the a development stream and its parent is bi-directional and adheres to the merge down, copy up paradigm.

Perforce displays release streams that are children of the mainline stream above the mainline in the Stream Graph. Once you populate a release stream, the default flow of change between a release stream and its parent is unidirectional supporting merge down to the parent stream.

You can modify the stream settings and change the integration behavior for a stream if you want something other than the default behavior for the chosen stream type.

Every stream, with the exception of the mainline, has a parent. This field stores the name of the stream's parent. You can use the parent stream name in scripts to traverse the stream hierarchy. You can reparent a child stream by moving it to a new location in the Stream Graph or by changing the parent field in the stream spec.

You can instruct Perforce to automatically branch files when creating the stream or integrate the files manually, as a separate step, after creating the stream.

By default, the user that created a stream becomes the stream's owner. You can lock the stream to prevent other users from modifying the stream settings. You can also restrict the ability to submit files to the stream to the stream owner.

The stream's path in a stream depot serves as both the name of the associated stream spec and the permanent, unique identifier of the stream.

Unlike classic Perforce depots, the physical layout of the stream hierarchy in the depot is flat. All streams reside one level below the depot path. The stream's permanent identifier is in the format: //depotname/streamname where streamname is the root directory of the stream in the stream depot.

You can also specify a logical name for a stream to further describe the purpose or characteristics of the stream. Although the stream's root folder name is independent of the stream name, user's often configure them to be the same.

The patterns used in your stream root folder name can impact your ability to reference streams in commands that use file specs.

Remember that stream types and the parent child relationships across the stream hierarchy, not a stream's location in the depot file system, determine a stream's position in the Stream Graph.

The stream root folder name is set automatically, by default, to the value of the stream identifier.

The paths field allows you to define the stream view that specifies the files contained within the stream.

By default, all of the files contained within the parent stream are included in the child's stream view. You can modify the stream paths settings to override the inherited view.

Each line in the path field is of the form: path type, view path, depot path.

There are four different path qualifiers share, isolate, import, and exclude that control what you can do with the specified files.

For example:

share designates files that are syncable, submittable, and integratable

isolate is used for files that you might want to edit and submit, but would not want to integrate to other streams, such as built binaries and generated docs

import identifies files that are sourced from a specific location that can be sync'd but cannot be submitted or integrated

exclude specifies files that would normally be inherited from the parent from becoming part of the stream, keeping unneeded content out of workspaces and streams entirely

Note that the stream view also defines the client workspace view for all workspaces connected to a stream.

You can use the remapped area to change the default mapping of the depot files to the workspace.

You can also specify file types to be ignored, which is useful for ensuring that artifacts such as object files or other interim files are never checked in or integrated. Perforce excludes ignored types from the client view for client workspaces associated with the stream.

Course - Using Streams to Simplify Codeline Management