How to Branch Using Streams

Branching in Streams follows the merge-down, copy-up best practice. Changes are merged down from the more stable parent stream into the child stream. Changes made in the child stream are copied up.

There are different types of streams available. We are going to talk about three of them.

Learn more about other types of streams

Mainline Stream

A mainline stream is often the main codeline for your project. Development and release branches can be made from this stream.

Release Stream

A release stream should include your most stable code. It does not expect copying up from its parent stream, often the mainline. This stream is useful for ongoing stabilization, bug fixing, and release maintenance.

Development Stream

A development stream is usually less stable than its parent. Depending on the complexity of your branching strategy, the parent may be the mainline. These streams can be used for long-term projects and major new features.

Start Working in a Stream

To start working in a stream or switch from one stream to another you can either:

  • In the Streams tab or the Stream Graph, right-click a stream and select Work in this Stream.
  • In the Stream Graph, drag the workspace from your current stream to the one you want to work in.

Your Stream Preferences

Your stream preferences will determine how you work. You can either:

  • Use a different workspace and to show an information dialog when switching workspaces.
  • Use the same workspace when you switch between streams.

Create a Child Stream

Before you create a child stream, you need to set up a depot, mainline, and added files.

  1. In the Streams tab, right-click on the stream and select Create New Stream from 'stream_name’.
  2. In the dialog box, specify the name of your child stream. By default, the name you specify is used as the name of the folder under the stream depot folder. To override the default folder name, go to the Advanced tab.
  3. Choose the stream type.
  4. For release and development streams, choose the parent stream. By default, the stream inherits its parent’s stream view. To edit the view of the child stream, go to the Advanced tab. The Advanced tab options enable you to do the following:
    • Edit the inherited view.
    • Change the default locations of files mapped from the depot.
    • Lock the stream settings so that only the owner can edit them.
    • Restrict check-ins to the stream owner.
    • Allow to merge the stream’s content both up and down.
    • Specify file or folder patterns that you want ignored by the stream.
  5. Select whether to Create a workspace for use with this stream.
  6. Select whether to Branch files from parent on stream creation. If you choose not to branch files immediately, you can copy them later.
  7. Click OK to save.
  8. Verify that the new stream appears correctly in the Stream Graph

Visualize Streams

With Streams, you can see and do more. Use these other tools to see how code evolves over time.

Revision Graph

Use the Revision Graph in Helix Core to quickly visualize the branching structure of any file.

Time-Lapse View

Use the Time-Lapse view to view and contrast all versions of a file in just one window.

Want Help Setting Up Perforce?

Contact our professional services team to talk to experts. They can optimize your Helix Core servers for top performance.

Do More With P4V

Setting up Perforce is easy with our P4V cheat sheet.

Read the Docs

Get step-by-step instructions on how to install, administer, optimize, and use Helix Core.