Search code examples
diffbranchperforce

Perforce visual diff of a branched file (p4 diff2 with external diff)


I'd like see a visual diff of a branched file. So I do this

p4 diff2 -b branchname main.cpp

One problem... it's not visual and external diff isn't supported. http://www.perforce.com/perforce/doc.current/manuals/cmdref/diff2.html

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 Perforce server,
and always uses the server's built-in diff routine.

I want my visual diff. How do I get it?


Solution

  • Maybe easiest to do the diff from P4V?

    Other than that, you might have to p4 print the two files to some local temporaries, and then run the diff on those?