Perforce Command Reference:   [Index] [Prev] [Next]


p4 branch

Synopsis

Create or edit a branch view specification

Syntax

p4 [g-opts] branch [ -f ] branchspec
p4 [g-opts] branch -o branchspec
p4 [g-opts] branch -d [ -f ] branchspec
p4 [g-opts] branch -i [ -f ]

Description

p4 branch allows you to store a mapping between two sets of files for use with p4 integrate. This command displays a form: enter a view that expresses the mappings between the files you're integrating from (the fromFiles) and the files you're integrating to (the toFiles), specifying both sides of the view in depot syntax.

Once the branch specification has been created and named, you can integrate files by typing p4 integrate -b branchspecname; the branch specification will automatically map all toFiles to their corresponding fromFiles.

Calling p4 branch has no immediate effect on any files in the depot. Perforce will create the branched files in the client workspace the first time you call p4 integrate -b branchspecname.

Form Fields

Field Name Type Description
Branch read-only The branch name, as provided on the command line.
Date read-only The date the branch specification was last modified.
Description optional A short description of the branch's purpose.
View mandatory A set of mappings from one set of files in the depot (the from files or source files) to another set of files in the depot (the to files or target files). The view maps from one location in the depot to another; it can't refer to a client workspace.

Options

-d Delete the named branch specification. Files are not affected by this operation; only the stored mapping from one codeline to another is deleted. Only the user who created the branch can normally use this flag.
-f Allows superusers to delete branches they don't own. Also lets superusers change the modification date of the branch specification.
-i Read the branch specification from standard input without invoking an editor.
-o Write the branch specification to standard output without invoking an editor.
g_opts See global options section.

Usage Notes

Can File Arg Use
Revision Specifier?
Can File Arg
Use Revision Range?
Minimal
Access Level Required
<NA> <NA> open

//depot/project/dev/... //depot/project/r2.0/...
Branch views may contain multiple mappings. See the Views chapter for more information on specifying views.

Related Commands

To view a list of existing branch specifications p4 branches
To copy changes from one set of files to another p4 integrate



Perforce Command Reference:   [Index] [Prev] [Next]


Copyright 1999 Perforce Software.
Contact us at [email protected]
Last updated: 09/15/99 (Manual version 99.1.cr.6)