p4 switch

Synopsis

Switch to a different stream, with an option to populate that stream, or display current streams.

Syntax


p4 [g-opts] switch [-c -m -r] [-P parentstream
p4 switch -l
p4 switch

Description

This command allows you to create, manage and switch between your streams. Note that p4 switch automatically performs a p4 reconcile and p4 sync as part of its operations and automatically shelves work in progress when switching between streams.

Options

With no options specified p4 switch displays the current stream.

-c

Specifies that the new stream be populated with exactly the same files that are in the current stream.

-l

Lists all known branches.

-m

Specifies that the new stream has no parent.

-P parent

Specifies the parent stream of the new stream, letting you branch from a stream other than the current one.

-r

Reopens files in the new mapped location of the specified stream.

Usage Notes

Can File Arguments Use Revision Specifier?

Can File Arguments Use Revision Range?

Minimal Access Level Required

N/A

N/A


open to use the -c or -r options,
list to use the -L option,
or write for default switching

Examples

p4 switch -r bugfix17

Switch to the bugfix17 stream and open all the files in it.

Related Commands

Merge

p4 merge

Resolve

p4 resolve