Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.1

# Flow rules

When you create a stream, you configure a stream specification. In the stream spec, you specify the type of stream you want from the available Stream types, and provide information about the files it is associated with, its relationship to other streams, and how files are to be treated for branching and merging.

The stream type indicates the stability of the stream relative to other streams.

The stream’s path information determines:

- which files to populate the workspace with
- which files child streams are allowed to branch
- which changelist to lock the files at

Parent labeling specifies how the stream relates to other streams, helping to determine how change flows through the set of streams.

According to The mainline model, changes are merged down to streams of lesser stability and copied up to streams of greater stability. For example, a stream of type `development` might merge down to get the latest content from the `mainline` stream, develop a new feature and test it in the `development` stream, then copy the changes up to the `mainline` stream.

The flow rules determine how integrations can be done from parent to child or from child to parent. The flow rules are controlled by the streams options `toparent`/`notoparent`, `fromparent`/`nofromparent`, `mergedown`/`mergeany`.

By default, `development` streams have a default option of `fromparent` and `release` streams have a default option of `nofromparent`.

Both `development` and `release` streams have `toparent` and `mergedown` as defaults.

If a `release` stream has the default `nofromparent` option set, an attempt to merge from the parent results in an error.

### Merge down, copy up

The mainline model is associated with the concept of "merge down, copy up".

Merging with p4 merge incorporates another stream’s changes into your stream, and can require you to resolve conflicts.

Copying with p4 copy duplicates the source stream to the target.

A release stream is more stable than its `mainline` stream parent, so merge down occurs from a `release` stream to the `mainline` stream. Similarly, a merge down might occur from a `sparserel` stream to its parent stream. See Sparse streams. |
A `development` stream is less stable than its `mainline` stream parent. After a `development` stream does a merge down from the `mainline` stream, it can copy up to the `mainline` stream. |

If you are using P4 Server branches and want to use streams instead, see the Perforce Knowledge Base article, Migrating from Classic to Stream Depot.

Your search for returned results