p4 label
Create or edit a label specification and its view.
Syntax
p4 [g-opts] label [-f -g] [-t template] labelname
p4 [g-opts] label -d [-f -g] labelname
p4 [g-opts] label -o [-t template] labelname
p4 [g-opts] label -i [-f -g]
Description
Use p4 label
to create a new label specification or
edit an existing label specification. A labelname
is
required.
Running p4 label
allows you to configure the mapping
that controls the set of files that are allowed to be included in the
label. After configuring the label, use p4 labelsync
or p4 tag
to tag files with the
label.
Labels can be either automatic or static. Automatic labels refer to the
revisions provided in the View:
and Revision:
fields. Static labels refer only to those specific revisions tagged by
the label by means of either the p4
labelsync
or p4
tag
commands.
Only the Owner:
of an unlocked
label can use
p4 labelsync
or p4 tag
to tag files with that
label. The owner of a group may be a single user or a group.
A branch, depot, label, and workspace may not share the same name.
Form Fields
Field Name | Type | Description |
---|---|---|
|
Read-only |
The label name as provided in the invoking command. Be aware of the Limitations on characters in filenames and entities. |
|
Writable, optional |
The label’s owner. By default, the user who created the label. Only the owner of a label can update which files are tagged with the label. The specified owner does not have to be a Helix Server user. You might want to use an arbitrary name if the user does not yet exist, or if you have deleted the user and need a placeholder until you can assign the spec to a new user. |
|
Read-only |
The date the label specification was last modified. |
|
Read-only |
The date and time the label was last accessed, either by running
|
|
Writable, optional |
An optional description of the label’s purpose. |
|
Writable |
Options to control behavior and storage location of labels
|
|
Writable |
An optional revision specification for an automatic label. If you use the |
|
Writable |
A list of depot files that can be tagged with this label. No
files are actually tagged until Unlike client views or branch views, which map one set of files to another, label views consist of a simple list of depot files. See Views for more information. |
|
Writable, optional |
If set, restricts usage of the label to the named server. If unset, this label may be used on any server. |
Options
|
Delete the named label if it’s |
|
Allow the |
|
In distributed environments, use the |
|
Read the label definition from standard input without invoking the editor. |
|
Write the label definition to standard output without invoking the editor. |
|
Copy label |
|
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 |
|
- To create an automatic label, fill in the
Revision:
field of thep4 label
form with a revision specifier. When you sync a workspace to an automatic label, the contents of theRevision:
field are applied to every file in theView:
field. -
With a distributed Perforce service, labels may be local or global. Local labels are restricted to a single edge server, and cannot be used on other servers. Global labels are created and updated on the commit server, and are visible to all servers. However, global labels may only be used with global (unbound) client workspaces.
By default, labels are local to your edge server, and you use the
-g
option to access global labels on the commit server. If your administrator has setrpl.labels.global
to1
, labels are global by default, and the meaning of the-g
option is inverted to allow updating of local labels.
Examples
|
List the file revisions tagged by
|
Related Commands
To synchronize a label with the client workspace. |
|
To list all labels known to the system |
|
To create a label and tag files with the label |