11.07.2015 Views

Perforce 2003.1 Command Reference

Perforce 2003.1 Command Reference

Perforce 2003.1 Command Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

p4 diff2p4 diff2SynopsisCompare two depot file revisions.Syntaxp4 [g-opts] diff2 [-dflag -q -t] file1[rev] file2[rev]p4 [g-opts] diff2 [-dflag -q -t] -b branch [ [fromfile[rev]] tofile[rev] ]Descriptionp4 diff2 uses the <strong>Perforce</strong> server’s built-in diff routine to compare two file revisionsfrom the depot. These revisions are usually two versions of the same file, but they can berevisions of entirely separate files. If no file revision is explicitly provided with the fileargument, the head revision is used.p4 diff2 does not use the diff program specified by the environment variable P4DIFF.The diff algorithm used by p4 diff2 runs on the machine hosting the <strong>Perforce</strong> server, andalways uses the server’s built-in diff routine.You can specify file patterns as arguments in place of specific files, with or withoutrevision specifiers; this causes <strong>Perforce</strong> to perform multiple diffs for each pair of files thatmatch the given pattern. If you invoke p4 diff2 with file patterns, escape the file patternsfrom the OS shell by using quotes or backslashes, and be sure that the wildcards in thetwo file patterns match.<strong>Perforce</strong> presents the diffs in UNIX diff format, prepended with a header. The header isformatted as follows:==== file1 (filetype1) - file2 (filetype2) ==== summaryThe possible values and meanings of summary are:• content: the file revisions’ contents are different,• types: the revisions’ contents are identical, but the filetypes are different,• identical: the revisions’ contents and filetypes are identical.If either file1 or file2 does not exist at the specified revision, the header will display thesummary as .48 <strong>Perforce</strong> <strong>2003.1</strong> <strong>Command</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!