Perforce 2003.1 Command Reference
<< Previous Chapter
p4 admin
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 branch

p4 annotate

Synopsis

Print file lines along with their revisions.

Syntax

p4 [g-opts] annotate [ -aq ] file[revRange] ...

Description

The p4 annotate command displays the revision number for each line of a revision (or range of revisions) of a file (or files). You can then run p4 filelog on the indicated revision(s) to find out who made each change, when, and why.

If you specify a revision number, only revisions up to that revision number are displayed. If you specify a revision range, only revisions within that range are displayed.

By default, the first line of output for each file is a header line of the form:

where filename#rev is the file's name and revision specifier, action is the operation the file was open for: add, edit, delete, branch, or integrate, num is the number of the submitting changelist, and type of the file at the given revision.

To suppress this header line, use the -q (quiet) option.

To print all lines (including lines from deleted files and/or lines no longer present at the head revision), use the -a (all) option.

Options

-a

All lines, including deleted lines and lines no longer present at the head revision, are included.

Each line includes a starting and ending revision.

-q

Quiet mode; suppress the one-line header for each file.

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

read

Examples

p4 annotate file.c

Print all lines of file.c, each line preceded by the revision that introduced each line into the file.

p4 annotate -a file.c

Print all lines of file.c, each line preceded by a revision range.

The starting and ending revision for each line are included. (The head revision is displayed numerically)


Perforce 2003.1 Command Reference
<< Previous Chapter
p4 admin
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 branch
Please send comments and questions about this manual to [email protected].
Copyright 1999-2003 Perforce Software. All rights reserved.
Last updated: 07/07/03