Stream views and paths

A stream specification has a set of field names (see p4 stream). The Paths, Remapped, and Ignored fields define the stream "view". These fields control the files and paths that compose a stream and define how those files are propagated.

  • A mainline stream has no parent.
  • A task streams or a virtual streams always inherits its view from its parent stream.
  • A stream of other types can be set to inherit or not inherit from the parent stream.
  • To not inherit from the parent stream might be a good choice for a release stream.

To modify the structure of the child, you specify the paths as follows:

Type Sync? Submit? Integrate to/from Parent? Remarks

share

Y

Y

Y

(Default) For files that are edited and propagated between parent and child streams. All files in a shared path are branched and, in general, shared paths are the least restricted.

isolate

Y

Y

N

For files that must not be propagated outside the stream, but can be edited within it, such as binary build results.

import

Y

N

N

Files in this path are mapped as in the parent stream's view (the default) or to <depot_path> (optional). Such files are accessible to workspaces but cannot be submitted or integrated to the stream.

If <view_path> is used, it does not necessarily import files from the parent of the stream it was used on. It imports the view. If the parent stream has a parent (grandparent) and the parent's stream view is shared, files are imported from the grandparent stream. An example would be the virtual stream created of a release or development stream, where files are imported from the mainline.

If <depot_path> is used (for files that must be physically present in the stream but are never changed, such as with third-party libraries), it can include a changelist or automatic label specifier (that aliases a changelist) to limit the imported files to the revisions at that change or lower. Clients of that stream are limited to seeing revisions at that point in time or lower within that depot path. Use the syntax @changelist#, as in: //depot/lib3.0/…​@455678.

import+

Y

Y

N

Similar to an import path, in that it can reference an explicitly defined depot path, but unlike a standard import path, you can submit changes to the files in an import+ path.

import&

Y

N

N

Similar to an import path, except that multiple import& paths can map a <depot_path> to multiple <view_path>s.

Such one-to-many mapping is also called ditto mapping.

Files marked this way are readonly. The <depot_path> is required: <view_path> <depot_path>

This feature does not support graph depotsClosed A depot of type graph that is used to store Git repos managed by Helix Core Server. See also Git Connector and classic depot.

See the example of ditto mapping for stream specs in the p4 stream topic of Helix Core Command-Line (P4) Reference.

exclude

N

N

N

Files in the parent stream that must never be part of the child stream.

In the following example,

  • files in the src path are not submittable (and are imported from the parent stream’s view)

  • files in the lib path are not submittable (and are imported from an explicitly-specified location in the depot)

  • files in the db path can be edited and submitted in the stream, but can never be copied to the parent:

Paths:
        share ...
        import src/...
        import lib/... //depot/lib3.0/...
        isolate db/...

The paths are used to generate the mappings for workspaces that are associated with the stream. If the stream structure changes, the workspace views are updated automatically and cannot be altered manually. If the stream is locked, only the stream owner (or stream owners, if the Owner: field of the stream is set to a group) can edit the stream specification.

A stream specification can also:

  • remap file locations so that a file in a specified depot location is synced to a different location in the workspace

  • screen out files according to file type

For example, to ensure that object files and executables are not part of the stream, add the following entries to the stream specification:

Ignored:
        .o
        .exe

Also in this section: