Reputation: 3224
I have a couple of similar pending changelists based on top of a branch of code and off the same workspace in perforce. I need to diff between them and (eventually) merge them together into one changelist. What is the fastest and simplest way to go about it? I would rather avoid creating a temporary branch.
Upvotes: 4
Views: 4445
Reputation: 91
Try
p4 diff2 //repo/path/to/file@=shelf1 //repo/path/to/file@=shelf2
To compare all files:
p4 diff2 //repo/path/...@=shelf1 //repo/path/...@=shelf2
where 'shelf1' and 'shelf2' are your shelved changelists.
Caveat: you can only do a textual diff with 'p4 diff2'
Upvotes: 1
Reputation: 11662
The general answer to your question (where merging is not the goal) is that it's not possible with a p4 command.
You have to unshelve both changelists to different workspaces then run an external diff tool on the two workspace directories.
Upvotes: 4
Reputation: 16359
Recent versions of the server support unshelving a change into a workspace with opened files, and resolving the merge.
So, assuming your server is recent enough, you simply:
Upvotes: 5