Previous Table of Contents Index Next
Perforce 2009.2: Command Reference

p4 label
Create or edit a label specification and its view.
p4 [g-opts] label [ -f -t template ] labelname
p4 [g-opts] label -o [ -t template ] labelname
p4 [g-opts] label -d [ -f ] labelname
p4 [g-opts] label -i [ -f ]
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.
Form Fields
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 date and time the label was last accessed, either by running p4 labelsync on the label, or by otherwise referring to a file with the label revision specifier @label.
Writable, optional
locked or unlocked. If the label is locked, the list of files tagged with the label cannot be changed with p4 labelsync.
If you use the # character to specify a revision number, you must use quotes around it in order to ensure that the # is parsed as a revision specifier, and not as a comment field in the form.
A list of depot files that can be tagged with this label. No files are actually tagged until p4 labelsync is invoked.
Unlike client views or branch views, which map one set of files to another, label views consist of a simple list of depot files. Please see the Views chapter for more information.
Delete the named label if it's unlocked. The -f flag forces the deletion even if the label is locked. (Deleting a locked label requires admin or super access.)
Allow the Update: field's date to be set. Can be used with either the -i flag or the -t flag for the same purpose.
-t template
Copy label template's view and options into the View: and Options: fields of this label.
Usage Notes
Can File Arguments Use
Revision Specifier?
Related Commands

Previous Table of Contents Index Next

Perforce 2009.2: Command Reference
Copyright 1999-2009 Perforce Software.