Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between p4diff and p4diff2

Tags:

diff

perforce

What is the difference between P4 diff and P4 diff2?

like image 934
drastogi Avatar asked Jun 25 '12 08:06

drastogi


People also ask

What does p4 change do?

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.

What is p4 status?

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 .

How does p4 DIFF Work?

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.

What is p4 opened?

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.

What does p4 Sync do?

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.


1 Answers

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.
like image 180
jhwist Avatar answered Nov 15 '22 09:11

jhwist