Perforce 2007.2 Command Reference
<< Previous Chapter
p4 sync
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 tickets

p4 tag

Synopsis

Tag files with a label.

Syntax

p4 [g-opts] tag [ -d -n ] -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

-d

Delete the label tag from the named files.

-n

Display what p4 tag would do without actually performing the operation.

-l labelname

Specify the label to be applied to file revisions

g-opts

See the Global Options section.

Usage Notes

Can File Arguments Use
Revision Specifier?

Can File Arguments Use
Revision Range?

Minimal Access Level Required

Yes

Yes

open

Examples

p4 tag -l rel1 //depot/1.0/...

Tag the head revisions of files in //depot/1.0/... with label rel1.

If the label rel1 does not exist, create it.

p4 tag -l build //depot/1.0/...@1234

Tag the most recent revisions as of the submission of changelist 1234 of files in //depot/1.0/... with label rel1.

If the label rel1 does not exist, create it.

p4 files @labelname

List the file revisions tagged by labelname.

Related Commands

To create or edit a label

p4 label

To list all labels known to the system

p4 labels

To tag revisions in your client workspace with a label

p4 labelsync

To create a label and tag files with the label

p4 tag


Perforce 2007.2 Command Reference
<< Previous Chapter
p4 sync
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 tickets
Please send comments and questions about this manual to [email protected].
Copyright 1999-2007 Perforce Software. All rights reserved.
Last updated: 05/21/07