p4 stream
Synopsis
Create, edit or delete a stream specification.
Syntax
p4 [g-opts
] stream [-P
parent
] -t type
name
p4 [g-opts
] stream [-f -d] [-o [-v]]
[-P parent
] -t type
name
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
Description
The p4 stream
command enables you to maintain Perforce 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.
Development streams are least stable (most subject to change),
mainline streams are somewhat stable, and release streams are highly
stable. Virtual streams can be used to copy and merge between parent
and child streams without storing local data. 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.
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 section "Stream workspaces" in
the "Streams" chapter of the Helix Versioning Engine 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.
Note
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, refer to the Helix Versioning Engine 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
|
|
Read-only |
The date the stream specification was last modified. |
|
Read-only |
The date and time that the stream specification was last accessed by any Perforce command. |
|
Writable, mandatory |
The Perforce user or group who owns the stream. The default is the user who created the stream. |
|
Writable |
Display name of the stream. Unlike the |
|
Writable |
The parent of this stream. Must be |
|
Writable, mandatory |
The stream’s type determines the expected flow of change. Valid stream
types are
The default is stream type is |
|
Writable, optional |
Description of the stream. |
|
Writable |
Settings that configure stream behavior as follows:
A Flow options are ignored for |
|
Writable |
Paths define how files are incorporated into the stream structure. Specify paths using the following format:
where The default path is Valid path types are:
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 Note that the |
|
Writable, optional |
Reassigns the location of workspace files. To specify the source path and its location in the workspace, use the following syntax:
where
Line ordering in the |
|
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 |
Options
|
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 |
|
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 |
|
Verbose option; includes the automatically-generated client view for this stream. |
|
When creating a new stream specification, specify the stream’s parent. (This option has no effect on an existing stream specification.) |
|
When creating a new stream specification, you must specify the
stream’s type: either |
|
For |
|
For |
|
For |
|
For |
|
For |
|
For |
|
For |
|
See “Global Options”. |
Usage Notes
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
N/A |
N/A |
|
- As the name implies, task streams are intended to be short-lived; after you have finished using a task stream by promoting your changes to its parent, delete the task stream.
Examples
|
Create a development stream for project X by branching the mainline. |