Helix Core — version control from Perforce — tracks, manages, and secures changes to all your digital assets, including large binary files. Scale your infrastructure, support your remote teams, and move faster.

TRY HELIX CORE FREE

Want to learn more? Explore version control branching.

Full Video Transcript 

Perforce Streams is how branching and merging is done with Helix Core version control. It's a better way to branch and merge, which is why we sometimes call it “branching with brains.”

It provides a better way to manage concurrent development, dependencies, and other common branching and release activities. It provides projects with a workflow framework based on best practices.

 

Why use Streams?

Streams is flexible enough to accommodate many branching strategies and development models. It is both lightweight and powerful. It organizes code lines to allow users to see where changes should flow, and how they're going to be propagated between branches. This helps to eliminate obstacles for developers and increase productivity.

Developers and DevOps professionals both benefit from Streams.

Developers can be instantly productive. This is because Streams provides a high level of automation, along with visual cues to prevent common errors in branching and merging.

Admins, project managers, and DevOps teams benefits from Streams by being able to simplify their build environment.

 

Streams vs. Branches

If you are already a Perforce user, you probably want to know: what are the advantages of using Perforce Streams over classic branching?

Each particular stream represents a codeline. A codeline is a set of files that belong together. With classic branching, codelines are in folders. There is no defined relationship between these folders. Admins and developers manually enforce these relationships. For example, from dev to mainline, to production.

In most development methodologies, there is a codeline that represents the master of the project or product. Another word for this is trunk, as in the trunk of a tree. In Streams, we call this the mainline.

In many cases, this is the body of code that everything flows into. For example, development activities by each developer will be merged into the mainline. Before those merges, the code in each developer’s branch would be updated to reflect the changes made by the other developers.

Whatever the stream type, all streams live in a Streams Depot. This helps you organize streams to make sure that all the requirements are being met.

For branching and merging, one of the primary benefits of Streams over classic branching is the fact that streams know how they are related to each other. You don’t need to try and figure this out. Each stream, other than the mainline, has a parent. The parent indicates the flow of change.

Streams follows the merge down/copy up protocol. The idea is that changes are always merged down into a less stable codeline. This is because merging up can potentially destabilize the codeline. Once the change is tested and verified, changes can be copied up. When the mainline is ready to release, changes can be copied up into a release stream.

Streams removes the complexity and eliminates the question, “where does this change go in this branch?" This is clearly defined in the Stream Graph. The colors on the graph indicate whether there are any changes left over. We can see here that a fix has not been incorporated. It needs to be propagated down to main to avoid any future regressions. If the arrow is gray, this has already been completed.

These colors also show changes that still need to be included. If there are green arrows remaining, there is more work to be done. If there are any red arrows, then changes are ready to be propagated up, but they're currently blocked.

Streams helps to protect changes from being overwritten. The changes done by others can merge down, and once complete, the new code gets the green light to copy back up.

This was just a quick introduction to Perforce Streams. To learn how Streams can revolutionize your environment, sign up for our next demo.