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 the Helix Core Command-Line (P4) Guide.
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,
-
Create or edit a stream. (See Create streams or Edit stream specs)
-
In the Advanced tab
Components
section, specify one or more streams as components of your stream. For example, -
//streams/A
might have component definitions that arereadonly
,writeimport+
, andwriteall
.writeimport+
applies solely toimport+
paths in the stream component, andwriteall
applies toshare
,isolate
, orimport+
paths in the stream component.
For example,
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 the 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.
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 |
The |
Stream View
|
The (see Stream views and paths in the 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 |
Path Type
|
For example, (see Stream views and paths in the 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 |
For the view in stream X that originally comes from stream Z, the Source Stream is stream Z |
Source Path Type
|
When |
import or import+ |
Effective Component Type
|
The order of most restrictive to least restrictive is |
In this chain, From the perspective of |
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.