p4 streams

Display a list of streams.

Syntax

p4 [g-opts] streams [-U] [-F filter] [-T fields] [-m max] [-a] [streamPath ...]

p4 [g-opts] streams --viewmatch [-F filter] [-T fields] [-m max] //depotPath [[--viewmatch //depotPathN] ...]

Syntax conventions

Description

Lists the streams defined in the currently connected service. To filter the list, for example, to list streams for a particular depot, specify the streamPath. (See Stream views and paths in Helix Core Command-Line (P4) Guide)

The --viewmatch option indicates which streams have a stream viewClosed A stream view is defined by the Paths, Remapped, and Ignored fields of the stream specification. (See Form Fields in the p4 stream command) that matches the specified depot path. See the Examples for p4 streams.

Options

-F filter

Filter the output according to the contents of specified fields.

-m max

Maximum number of streams to list.

-T fields

Limit field output to fields specified in a list of fields. Field names may be separated by a space or comma. Intended for scripting. This option forces tagged output.

-U

Display task streams unloaded with p4 unload.

--viewmatch Returns the stream name, depot path, and stream view path of the streams that have views containing the given //depotPath, or that have views contained by the depot path. Multiple --viewmatch depotPath arguments can be supplied. In addition, exclusionary paths are supported. See Examples for p4 streams. For information on exclusionary mappings, see Exclude files and directories in Helix Core Command-Line (P4) Guide.
-a (Optional) Includes deleted streams when listing the streams.

g-opts

See the -ztag example in Examples for p4 streams as well as Global options.

Usage Notes

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

N/A

N/A

list

If no stream matches the specified argument, the command ignores the argument and returns all streams.

Examples for p4 streams

List the streams in the projects depot

p4 streams //stream/projectA/...

Include deleted streams in the list of streams by including (deleted)

p4 streams -a

Stream //streams/stream01 mainline none 'stream01'
Stream //streams/stream02 development //streams/stream01 'stream02' (deleted)

List the release streams owned by Maria

p4 streams -F "Owner=maria Type=release"

List deleted streams

p4 -ztag streams -F "deleted" -a

... Stream //streamd1/maria-stream1-mainline
... Name maria-stream1-mainline
... Parent none
... Type mainline
... deleted
... firmerThanParent n/a
... baseParent none
... ParentView inherit

List the stream name, stream path type, depot view path, and depot path of the streams that "match" the three specified depot paths:

  • all of the streams that share, isolate, or import the paths of projectA and projectB's lib1

  • streams that exclude projectB's lib2 because of an exclusionary mapping

p4 streams --viewmatch //stream/projectA/... --viewmatch //stream/projectB/lib1 --viewmatch -//.../projectB/lib2

In this example:

  • import+, share, exclude, and isolate are examples of stream path types

  • oWrite/..., ..., myExclude/..., and myIsolate/... are examples of stream view paths

  • //other/oWrite/..., //root/dev1/..., //root/dev1/myExclude/..., and //root/dev1/myIsolate/... are examples of depot paths

p4 streams --viewmatch //stream/projectA/... --viewmatch //root/dev1/myIsolate/... --viewmatch -//root/dev1/myExclude/...

Stream //stream/projectA import+ oWrite/... //other/oWrite/...
Stream //stream/projectB import+ oWrite/... //other/oWrite/...
Stream //root/main import+ oWrite/... //other/oWrite/...
Stream //root/dev1 share ... //root/dev1/...
Stream //root/dev1 exclude myExclude/... //root/dev1/myExclude/...
Stream //root/dev1 isolate myIsolate/... //root/dev1/myIsolate/... 

To see the original source (PathSource) from which the matching stream inherits its view, include the -ztag global option.

p4 -ztag streams --viewmatch="//depot/main/a/..."

might include:

Stream //str/dev3
DepotPath //depot/main/a/...
ViewPath depot-1/...
PathType import
PathSource //str/dev2

to indicate that //str/dev3 inherits the import of //depot/main/a/ from //str/dev2

Related Commands

Create, edit or delete a stream

p4 stream