Perforce Command Reference:   [Index] [Prev] [Next]


p4 fstat

Synopsis

Dump file info in format suitable for parsing

Syntax

p4 [g-opts] fstat [ -c changelist# ] [ -C -s ] file[rev]...

Description

The p4 fstat command dumps information about each file, with each item of information on a separate line. The output is best used within a Perforce API application where the items can be accessed as variables, but is also suitable for parsing by scripts from the client command output.

Form Fields

Field Name Description Example
clientFile local path to file /staff/userid/src/file.c
depotFile depot path to file //depot/src/file.c
haveRev revision last p4 synced to client, if on client. 1, 2, 3 ... n
headAction action taken at head revision, if in depot one of add, edit, delete, branch, or integrate
headChange head revision changelist number, if in depot. 1, 2, 3 ... n
headRev head revision number, if in depot 1, 2, 3 ... n
headTime Head revision modification time, if in depot. Time is measured in seconds since 00:00:00 UTC, January 1, 1970. 919283152 is a date in early 1999
headType head revision type, if in depot text, binary, text+k, etc. (see the chapter on File Types.)
action open action, if opened on your client one of add, edit, delete, branch, or integrate
change open changelist number, if opened on your client 1, 2, 3 ... n
unresolved the number, if any, of unresolved integration records 1, 2, 3 ... n
otherOpen number of other users who have the file open, blank if no other users have the file open 1, 2, 3 ... n, followed by n records listing the users (from 0 through n-1):
... otherOpen 3
... ... otherOpen0 user1@cws1
... ... otherOpen1 user2@cws2
... ... otherOpen2 user3@cws3
otherLock set if another user has the file locked, otherwise blank 1 or blank
ourLock set if the current user has the file locked, otherwise blank 1 or blank

Options

-c changelist# Displays only files affected since the given changelist number. This option is much faster than using a revision range on the affected files.
-C Limits output to files mapped on the current client
-s Shortens output by excluding client-related data (i.e. the clientFile field).
g_opts See global options section. The -s global option might be particularly useful here.

Usage Notes

Can File Arg Use
Revision Specifier?
Can File Arg
Use Revision Range?
Minimal
Access Level Required
Yes Yes list

Examples

p4 fstat file.c Displays information on file.c
p4 fstat -c 20 *.c Displays information on all .c files affected since checking-in of files under changelist 20.
p4 fstat -s file.c No client information lines (i.e. clientFile) will be displayed



Perforce Command Reference:   [Index] [Prev] [Next]


Copyright 1999 Perforce Software.
Contact us at [email protected]
Last updated: 09/15/99 (Manual version 99.1.cr.6)