What is the difference between P4 diff and P4 diff2?
p4 change brings up a form for editing or viewing in the editor defined by the environment variable P4EDITOR . When no arguments are provided, this command creates a numbered changelist. All files open in the default changelist are moved to the numbered changelist.
The p4 status command finds unopened files in a client's workspace and detects the following three types of inconsistencies between your workspace and the depot: Files present in the depot, present in your have list, but missing from your workspace. By default, these files are then opened for delete .
p4 diff runs a diff program on your workstation that compares files in your workspace to revisions in the depot. This command takes a file argument, which can contain a revision specifier. If a revision specifier is included, the file in the client workspace is diffed against the specified revision.
Description. Use p4 opened to list files that are currently open via p4 add , p4 edit , p4 delete , or p4 integrate . By default, all open files in the current client workspace are listed.
p4 sync brings the client workspace into sync with the depot by copying files matching its file pattern arguments from the depot to the client workspace. When no file patterns are specified on the command line, p4 sync copies a particular depot file if it meets all three criteria: Visible through the client view.
p4 diff
is used on the client, e.g. to compare a locally modified file to the version on the depot. p4 diff2
is used to compare two files on the server.
From the manual:
$ p4 help diff
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.
$ p4 help diff2
'p4 diff2' runs on the server to compare one set of depot files (the
'source') to another (the 'target'). Source and target file sets
can be specified on the 'p4 diff2' command line or through a branch
view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With