Create or edit a label specification and its view.
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]
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.
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 Perforce 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. |
|
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. |
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
N/A |
N/A |
|
Revision:
field of the p4 label
form with a revision
specifier. When you sync a workspace to an automatic label, the
contents of the Revision:
field are applied to every file
in the View:
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 set rpl.labels.global
to
1
, labels are global by default, and the meaning of the
-g
option is inverted to allow updating of local
labels.
|
List the file revisions tagged by
|
To tag revisions in your client workspace with a label |
|
To list all labels known to the system |
|
To create a label and tag files with the label |
|