Stream components

The 2022.1 release of Helix Core Server introduced a featured called Stream components. Stream components allow stream client views to include other stream views. By referencing another stream, using the component syntax, that stream becomes a component of the consuming stream. Similar to import template paths, a stream component allows the stream client access to files outside of the current stream, but without the maintenance issues associated with keeping template paths up to date. For more details, see Stream Components in Helix Core Command-Line (P4) Guide.

Tip

It is a best practice to check out the stream spec before making changes, and only submit the stream when you are sure the changes are suitable for you and the other members of your team. See Edit a stream privately.

Stream components in P4V

To use the stream component feature in P4V,

  1. Create or edit a stream. (See Create streams or Edit stream specs)

  2. In the Advanced tab Components section, specify one or more streams as components of your stream. For example,

  3. //streams/A might have component definitions that are readonly, writeimport+, and writeall.

    writeimport+ applies solely to import+ paths in the stream component, and writeall applies to share, isolate, or import+ paths in the stream component.

    For example,

  4. readonly dirY //streams/Y
    readonly dirZ //streams/Z@4
    writeimport+ dirD //streams/D
    writeall dirE //streams/E

    where

    //streams/Y is at head

    //streams/Z@4 is at change 4

    //streams/D and //streams/E are writeable components, rather than readonly components. See Writable components in Helix Core Command-Line (P4) Guide.

When you save the stream definition, by default you are prompted to Get Latest so that the component files are added to your workspace view. To change the default, see Behavior preferences for Update files when modifying workspace mappings.

The View field of the stream spec shows the effect of adding the stream components.

Note

The stream components feature is only available if your administrator has enabled it. See Stream Components in the Helix Core Command-Line (P4) Guide.

If the P4V version is prior to the 2022.2 release, Stream > Advanced lacks the Components section, but any stream components are listed in the Additional Fields section.

Find in Streams dialog box

In this example,

//streams/X has a component definition "readonly dirY //streams/Y"
and
//streams/Y has a component definition "readonly dirZ //streams/Z"

Click on a path in the Depot tab, context click, and select Find in Streams.

The Find in Streams dialog box appears and finds all Depot Paths that:

  • contain the search path you clicked on
    or

  • are contained by the search path you clicked on

Columns in the Find in Streams dialog box

Column

Description

Example

Stream

Name of the stream

//streams/X, //streams/Y, or //streams/Z
Depot Path

Path to Stream in depot syntaxClosed The syntax for specifying the location of files in the depot as opposed to the client workspace. Depot syntax begins with //depotName/

The Depo Path could be any path that is found by the search, such as //other/oRead/...

Stream View

The Paths, Remapped, and Ignored fields of the stream specification that automatically map the workspace associated with the stream.

(see Stream views and paths in Helix Core Command-Line (P4) Guide)

Path on the client workspace but without the client prefix. If the workspace is called maria, the client path would be //streams/dirY/dirZ/qReadZ/... and the Stream View would be dirY/dirZ/qReadZ/...

Path Type

share, isolate, import, import+, import&, or exclude.

For example, import

(see Stream views and paths in Helix Core Command-Line (P4) Guide)

Because stream X consumes component Y, and Y consumes component Z, and Z has a path import qReadZ/... //other/qRead/..., then X would have the Stream View of dirY/dirZ/qReadZ/...
Source Stream

The component, if Stream is not the same as Source Stream because Source Stream is the origin of the path.

For the view in stream X that originally comes from stream Z, the Source Stream is stream Z
Source Path Type

Source Path Type is shown when the Path Type was originally import or import+, but had to be converted to import& to resolve a conflict with a previous import with the same Depot Path.

When Source Path Type occurs, the PathType is import&, and Source Path Type is the original path type in the source.

import or import+
Effective Component Type

writeall, writeimport+, or readonly: whichever component type is the most restrictive for views originating from the end component in the chain of components.

The order of most restrictive to least restrictive is readonly, writeimport+, writeall

readonly if the Stream is //streams/X and readonly is the most restrictive component type in the chain.

In this chain, //streams/X defines //streams/Y as a readonly component.

//streams/Y then defines //streams/Z as a writeall component.

From the perspective of //streams/X, //streams/Z is treated as a readonly component due to readonly being the most restrictive type in the chain between //streams/X and //streams/Y

See "source stream and source path type" in Examples of stream components as well as "effective component type and the end component" in Writable components in Helix Core Command-Line (P4) Guide.

Filter changelists for streams

When you work with stream components, you might have many streams in submitted changelists and pending changelists. Suppose that you want to see only the pending changelists that involve stream specs. On the Pending tab and the Submitted tab, you can select the checkbox filter to Show only changelists that contain a stream. Alternatively, you can Show only changelists that do not contain a stream.