p4 stream

Create, edit, or delete a stream specification.


p4 [g-opts] stream [-P parent] -t typename
p4 [g-opts] stream [-f -d] [-o [-v]] [-P parent] -t typename
p4 [g-opts] stream -i [-f]
p4 [g-opts] stream edit
p4 [g-opts] stream resolve [-a flag] [-n] [-o]
p4 [g-opts] stream revert


The p4 stream command enables you to maintain Helix Server streams, which are hierarchical branches with policies that control the structure and the flow of change. Stream hierarchies are based on the stability of the streams, specified by the type you assign to the stream:

  • somewhat stable
  • the parent of all streams in the stream depot
  • least stable (most subject to change)
  • flow is controlled
  • highly stable
  • flow is controlled
  • lightweight short-lived stream that only promotes edited files to the repository
  • branched and integrated files are stored in shadow tables that are removed when the task stream is deleted or unloaded
  • used to copy and merge between parent and child streams without storing local data
  • not a stream but an alternate view of its parent stream

Stream contents are defined by the paths that you map. By default, a stream has the same structure as its parent (the stream from which it was branched), but you can override the structure, for example to ensure that specified files cannot be submitted or integrated to other streams.

By default, p4 stream edits the stream associated with your current workspace. It throws an error if you’re not using a stream workspace. For more information, see the "Streams" chapter of the Helix Core Server User Guide.

p4 stream edit puts your client’s stream spec into the "opened" state, isolating any edits made to fields that affect view generation. While the spec is open, these fields are marked with the comment "#open" to indicate that they are open and isolated to your client. Changes made to these fields affect your client’s view only; other clients' views are not affected.

p4 stream resolve resolves changes that have been submitted to the stream spec since you opened it. You may not submit changes to the stream spec until newer changes have been resolved. See the options table for an explanation of the flags you can pass to this command.

p4 stream revert reverts any pending changes made to the open stream spec, returning your client to the latest submitted version of the stream.


If you integrate from a classic branch or other stream depot to a task stream, the files are not copied up to the parent unless they are edited and submitted first.

For a detailed discussion of streams, see Helix Core Server User Guide.

Form Fields

Field Name Type Description


Writable, mandatory

Specifies the stream’s name (permanent identifier) and its path in the stream depot, in the form //depotname/streamname.

Be aware of the Limitations on characters in filenames and entities.



The date the stream specification was last modified.



The date and time that the stream specification was last accessed by any Helix Server command.


Writable, mandatory

The Helix Server user or group who owns the stream. The default is the user who created the stream.



Display name of the stream. Unlike the Stream: field, this field can be modified. Defaults to the streamname portion of the stream path.



The parent of this stream. Must be none if the stream’s Type: is mainline, otherwise must be set to an existing stream identifier of the form //depotname/streamname.


Writable, mandatory

The stream’s type determines the expected flow of change. Valid stream types are mainline, development, release, virtual, andtask.

  • mainline

    The mainline stream is the parent of all streams in the stream depot. Every stream depot must have at least one mainline stream.

  • virtual

    Virtual streams allow merging and copying between parent and child streams without storing local data. Data is passed through to the destination (a non-virtual stream) after applying restrictions on the scope of files defined in the virtual stream’s view.

    Because virtual streams do not have files in their depot namespace, it is impossible to import a virtual stream.

  • release

    More stable than the mainline. Release streams copy from the parent and merge to the parent.

  • development

    Less stable than the mainline. Development streams expect to merge from parent streams and copy to the parent.


    The default is stream type is development.

  • task

    Task streams are lightweight, short-lived branches that are useful for bug fixing or new features that only modify a small subset of the branch data.

    To keep repository metadata to a minimum, shadow tables track only branched (copied) files. The shadow tables are removed when the task stream is deleted or unloaded.


    Workspaces associated with task streams see all branched files, but only modified and promoted files are visible to users with access to the stream’s namespace.

    For example, if you run p4 describe for a task stream changelist from a workspace that is not associated with the task stream, you might see only a subset of the submitted files


    You cannot submit files to an import+ path in a task stream. See the explanation of the path type, import+ view_path [depot_path].


Writable, optional

Description of the stream.



Settings that configure stream behavior as follows:

  • [un]locked

    Enable/disable other users' ability to edit or delete the stream. If locked, the stream specification cannot be deleted, and only its owner can modify it. The default is unlocked.

  • [all|owner]submit

    Specifies whether all users or only the owner of the stream can submit changes to the stream. The default is allsubmit. If the Owner: of a stream marked ownersubmit is a group, all users who are members of that group can submit changes to the stream.

  • [no]toparent

    Specifies whether integrations from the stream to its parent are expected. The default is toparent.

  • [no]fromparent

    Specifies whether integrations to the stream from its parent are expected. The default is fromparent for mainline and development streams, and nofromparent for release streams.

  • mergeany | mergedown

    Specifies whether the merge flow is restricted or whether merge is permitted from any other stream. For example, the mergeany option would allow a merge from a child to a parent with no warnings.

A virtual stream must have its flow options set to notoparent and nofromparent.

Flow options are ignored for mainline streams.



Paths define how files are incorporated into the stream structure. Specify paths using the following format:

path_typeview_path [depot_path]

where path_type is a single keyword, view_path is a file path with no leading slashes, and the optional depot_path is a file path beginning with //.

The default path is share ....

Valid path types are:

  • share view_path

    Specified files can be synced, submitted, and integrated to and from the parent stream.

  • isolate view_path

    Specified files can be synced and submitted, but cannot be integrated to and from the parent stream.

  • import view_path [depot_path]

    Specified files can be synced, but cannot be submitted or integrated to and from the parent stream. The view_path is mapped as in the parent stream’s view, or to an (optional) depot_path.

    The depot_path can include a changelist specifier. Client workspaces associated with the stream only see revisions at that change or lower within that depot path. For example, if you specify //depot/import/...@1000 as the depot path, revisions from changelists greater than 1000 are hidden from most commands.


    Instead of a changelist number, you can use an automatic label specification.

    The changelist limits for a given stream workspace are displayed in a read-only client workspace specification field called ChangeView.


    A stream can import a repo from a depot of type graph. Within the stream, the content of the import is read-only. The examples below show that:

    • the .git suffix is required
    • the repo path must include a specific SHA-1 or ref


    import path/... //repo/name.git/restricted/view/path/...@sha


    import d3/... //repo/d3.git/*.js@c2e37352ac84eb8f90bc2866f715

    The imported data is locked at the time of the @sha.



    import path/... //repo/name.git/restricted/view/path/...@ref


    import d3/... //repo/d3@refs/heads/master

    A sync updates the data to the current time of the @ref.

    See Working with depots of type graph.

  • import+ view_path [depot_path]

    Functions like a standard import path, enable you to map a path from outside the stream depot to your stream, but unlike a standard import path, you can submit changes to the files in an import+ path.

  • exclude view_path

    Specified files cannot be synced, submitted or integrated to and from the parent stream.

By default, streams inherit their structure from the parent stream (except mainlines, which have no parent).

Paths are inherited by child stream views. A child stream’s path can downgrade the inherited view, but not upgrade it. (For example, a child stream can downgrade a shared path to an isolated path, but if the parent stream defines a path as isolated, its child cannot restore full access by specifying the path as shared.)

Note that the depot_path is relevant only when the path_type is import or import+.


In a virtual stream, when you import paths, be specific and provide import view-path with a depot-path argument. For example, suppose that you create this set of streams:

Stream //project1/mainQ mainline none 'mainQ'
Stream //project1/devQ1 development //project1/mainQ 'devQ1'
Stream //project1/devQ1-virt virtual //project1/devQ1 'devQ1-virt'

and you use Paths: share ... for all except the virtual stream, which has:


import foo/...
share foo/src/libs/lib1/...

Although you might expect that the foo path in the virtual stream comes from its parent, //project1/devQ1, the client view shows:

//project1/mainQ/foo/... foo/...

Therefore, we recommend that you use this more explicit syntax:

import foo/... //project1/devQ1/foo/...



To manage files of similar file-type in your stream specs, consider using wildcards (... and *) explicitly following the final slash in the path definition:

share ...
isolate BIN/....CLASS
isolate BIN/....exe
import imports/lib/*.a //depot/3rd_party/lib/*.a
import imports/lib/*.dll //depot/3rd_party/lib/*.dll
import imports/src/*.h //depot/3rd_party/src/*.h
exclude doc/....fm


Writable, optional

Reassigns the location of workspace files. To specify the source path and its location in the workspace, use the following syntax:


where view_path_1 and view_path_2 are Helix Server view paths (omit leading slashes and leading or embedded wildcards; terminal wildcards are fine). For example, to ensure that files are synced to the local ProjectX folder, remap as follows:

... projectX/...

Line ordering in the Remapped: field is significant: if more than one line remaps the same files, the later line takes precedence. Remappings are inherited by child streams and the workspaces associated with them.


Writable, optional

A list of file or directory names to be ignored in client views. For example:

/tmp # ignores files named "tmp"
/tmp/... # ignores directories named "tmp"
.tmp # ignores file names ending in .tmp

Lines in the Ignored: field can appear in any order. Ignored files and directories are inherited by child stream client views.


-d streamname

Delete the stream specification. A stream specification cannot be deleted if it is referenced by child streams or stream client workspaces. Deleting a stream does not remove its files. However, changes can no longer be submitted to the stream.


Administrators can use the -f option to delete or modify locked streams owned by other users.


Read the stream specification from standard input.


Write the stream specification to standard output. By default, it outputs the stream associated with the current workspace. If you pass the stream@change argument, Helix Server uses the version of the stream as of the specified changelist.

-o -v

Verbose option; includes the automatically-generated client view for this stream.

-P parent

When creating a new stream specification, specify the stream’s parent. (This option has no effect on an existing stream specification.)

-t type

When creating a new stream specification, you must specify the stream’s type: either mainline, development, release, task, or virtual.


For p4 stream resolve, performs a "safe" resolve; it skips fields that need merging.


For p4 stream resolve, resolves by merging; skips fields with conflicts.


For p4 stream resolve, forces a concatenation of text fields with conflicts.


For p4 stream resolve, forces acceptance of theirs, overwrites yours.


For p4 stream resolve, forces acceptance of yours, overwrites theirs.

-o -v

For p4 stream resolve, previews which fields require resolve.


For p4 stream resolve, outputs the base used for the merge.


See Global Options.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required





p4 stream -t development -P main //projectX/bruno-dev

Create a development stream for project X by branching the mainline.

Related Commands

List streams

p4 streams

Create stream depot

p4 depot