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


p4 diff

Synopsis

Display diff of client file with depot file

Syntax

p4 [g_opts] [ -d<flag> -f -sa -sd -se -sr ] [ file ... ]

Description

Run diff (on the client) of a client file against the corresponding revision in the depot. The file is only compared if the file is opened for edit or the revision provided with the file argument is not the same as the revision had by the client.

If no file argument is given, diff all open files. This can be used to view pending changelists. The -d<flag> passes a flag to the built-in diff routine to modify the output: -dn (RCS), -dc (context), -du (unified).

The -f flag forces a diff for every file, regardless of whether they are opened or if the client has the named revision.

This can be used to verify the client contents.

The -s flag outputs reduces the output of diff to the names of files satisfying the following criteria:

-sa: Opened files that are different than the revision in the depot, or missing.

-sd: Unopened files that are missing on the client.

-se: Unopened files that are different than the revision in the depot.

-sr: Opened files that are the same as the revision in the depot.



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


Copyright 1998 Perforce Software.
Contact us at [email protected]
Last updated: 06/14/98