In this video, we’ll explore the special stream type: Virtual Streams

Workspace views are defined by a stream, which means all the files in that stream are copied to your computer.

However, if you want to work on a specific directory, rather than syncing all the files in a stream, you can restrict your view by creating a virtual stream. A virtual stream acts as a filter, it’s a narrow subset of its Parent.

Changes made to files in your virtual stream are submitted directly to the parent stream, because a virtual stream is not a branch. No files are merged into the virtual stream. The files you are working on reside in the parent.

Virtual streams can be derived from any stream type–release, main, development, and even another virtual stream.

Let’s say that you are working on a project for this development stream, but you are only responsible for editing the files in the source directory. One option is to create a child stream of the development stream and then exclude the files you do not want; but this method would require you to go through the merge down/copy-up process with each submit. A virtual stream’s changes are automatically and directly propagated back to the parent stream.

To create a virtual stream, context-click a stream.

Select Create New Stream…

In the stream dialog, select the type: virtual

Name your virtual stream.

Next, in the Advanced Tab, define the stream path. Here, we are specifying that we only want the source files.

share pb/dev1.0/src/…

A virtual stream also allows you to import an explicit depot path, that overrides the inherited import view in the parent. Here you can use the import path to specify different depot components to be included for your development.

This is your newly created virtual stream. Its border is dashed and its relationship to its parent is shown by a solid gray line. No merge or copy indicators are present.

When you submit changes from a virtual stream, the merge integrations will only happen between the base parent stream and their associated streams.

Depending on the parental relationships, virtual streams appear above or below their base parents. Virtual streams created off of a mainline, will be displayed alongside the mainline.

If you want to view an entire project, just move your workspace from the virtual stream back into the integration stream.

Thanks for watching!

Course - Using Streams to Simplify Codeline Management