p4 tag
Synopsis
Tag files with a label.
Syntax
p4 [g-opts
] tag [-d -g -n -U] -l
labelname
file
[revRange
]
…
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 label tag from the named files. |
|
In distributed environments, use the |
|
Specify the label to be applied to file revisions |
|
Display what p4 tag would do without actually performing the operation. |
|
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, use p4 labelsync, which operates on the revision of files last synced to your workspace.
-
With a distributed Perforce service, p4 labelsync works with a label local to the edge server. The
-g
option can be used to apply a global label, but only with an unbound (global) client workspace.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
p4 tag -l rel1 //depot/1.0/... |
Tag the head revisions of files in
If the label |
p4 tag -l build //depot/1.0/...@1234 |
Tag the most recent revisions as of the submission of changelist
If the label |
p4 files @labelname |
List the file revisions tagged by
|