[This is preliminary documentation and is subject to change.]
Get content and existence diff details for two depot files.
Namespace: Perforce.P4Assembly: p4api.net (in p4api.net.dll) Version: 2012.2.63.1250 (2012.2.63.1250)
Syntax
C# |
---|
public IList<DepotFileDiff> GetDepotFileDiffs( string filespecleft, string filespecright, Options options ) |
Visual Basic |
---|
Public Function GetDepotFileDiffs ( _ filespecleft As String, _ filespecright As String, _ options As Options _ ) As IList(Of DepotFileDiff) |
Visual C++ |
---|
public: IList<DepotFileDiff^>^ GetDepotFileDiffs( String^ filespecleft, String^ filespecright, Options^ options ) |
Parameters
- filespecleft
- Type: System..::..String
- filespecright
- Type: System..::..String
- options
- Type: Perforce.P4..::..Options
Return Value
Remarks
p4 help diff
diff -- Display diff of client file with depot file
p4 diff [-d<flags> -f -m max -s<flag> -t] [file[rev] ...]
On the client machine, diff a client file against the corresponding
revision in the depot. The file is compared only if the file is
opened for edit or a revision is provided. See 'p4 help revisions'
for details about specifying revisions.
If the file specification is omitted, all open files are diffed.
This option can be used to view pending changelists.
The -d<flags> modify the output as follows: -dn (RCS), -dc[n] (context),
-ds (summary), -du[n] (unified), -db (ignore whitespace changes),
-dw (ignore whitespace), -dl (ignore line endings). The optional
argument to -dc specifies number of context lines.
The -f flag diffs every file, regardless of whether they are opened
or the client has synced the specified revision. This option can be
used to verify the contents of the client workspace.
The -m max flag limits output to the first 'max' number of files,
unless the -s flag is used, in which case it is ignored.
The -s options lists the files that satisfy the following criteria:
-sa Opened files that differ from the revision
in the depot or are missing.
-sb Files that have been opened for integrate, resolved,
and subsequently modified.
-sd Unopened files that are missing on the client.
-se Unopened files that differ from the revision
in the depot.
-sl Every unopened file, along with the status of
'same, 'diff', or 'missing' as compared to the
corresponding revision in the depot.
-sr Opened files that do not differ from the revision in
the depot.
The -t flag forces 'p4 diff' to diff binary files.
If the environment variable $P4DIFF is set, the specified diff
program is launched in place of the default Perforce client diff.
The -d<flags> option can be used to pass arguments to the diff
program. Because the -s flag is only implemented internally, any
-d<flags> option used with the -s<flag> is ignored. To configure a
diff program for Unicode files, set the environment variable
$P4DIFFUNICODE. Specify the file's character set as the first
argument to the program.