Virtual streams

A virtual stream is a filtered view of its parent stream. For example, you might only need to work within one folder of a development stream that has hundreds of folders. A virtual streams allows you to avoid having to sync all the files in all the folders of the parent stream.

A stream can have multiple virtual children.

A virtual stream can have child streams, and its child streams inherit its views. Virtual streams, like sparse streams and task streams, can only have inherit ParentViews.

Limitation on import

Virtual streams differ from other stream types in that a virtual stream is a filtered view rather than a true stream with its own separate set of files.

One consequence of this is a limitation on import. For stream types other than virtual, you can put a line in a stream definition that imports from a path you specify:

Paths:
share ...
import here/... //depot/there/...

However, if the target path is a virtual stream, the following imports no files:

Paths:
share ...
import here/... //str1/virtual-child-of-main/...

Instead, import those files by using the parent of virtual stream as the target path.

Paths:
share ...
import here/... //str1/main/...

Instead of relying on the filtered view of a virtual stream, focus the import on the subpath you want:

Paths:
share ...
import here/subpath/... //str1/main/subpath/...