p4 tag
Tag files with a label.
Syntax
p4 [g-opts] tag [-d -g -n -U] -l labelnameFileSpec[revSpec]
Description
Use p4 tag
to tag specified file revisions with a
label. A labelname is required. If a label named
labelname
does not exist, it is created
automatically. If the label already exists, you must be the
Owner:
of the label and the label must be
unlocked
in order for you to tag or untag files with the
label. (Use p4 label
to
change label ownership or lock status.)
If the file
argument does not include a revision
specification, the head revision is tagged with the label. If the file
argument includes a revision range specification, only files with
revisions in that range are tagged. (If more than one revision of the
file exists in the specified range, the highest revision in the specified
range is tagged.)
Options
|
Delete the association between the specified files and the label, regardless of revision. |
|
In multi-server environments, use the Global labels can be updated from edge servers using either p4 tag -g or p4 labelsync -g To learn more, see "Setting global client views" under Client workspaces and client views. |
|
Specify the label to be applied to file revisions |
|
Display what |
|
If tagging files with a new label, set the |
|
See Global options. |
Usage Notes
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
Yes |
Yes |
|
- By default,
p4 tag
operates on the head revision of files in the depot. To preserve the state of a client workspace, usep4 labelsync
, which operates on the revision of files last synced to your workspace. -
With a multi-server Perforce service,
p4 tag
works with a label local to the edge server (to which you are sending a request). The-g
option can be used to apply a global label, but only with an unbound (global) client workspace.Local Tag
Global Tag
rpl.labels.global
is unset, which is 0rpl.labels.global
set to 1by default, labels are local to your edge server by default, labels are global -g
option provides access to global labels on the commit server-g
option allows the updating of local labelsIf a label exists on an edge server before rpl.labels.global is set, and you want that label to be available on both the edge server and the commit server, unloaded the label from the edge server and reload it on the commit server
Examples
|
Tag the head revisions of files in If the label |
|
Tag the most recent revisions as of the submission of changelist
If the label |
|
List the file revisions tagged by
|
Related commands
To create or edit a label |
|
To list all labels known to the system |
|
To tag revisions in your client workspace with a label |