Alternate for P4 Diff2 in Perforce Java API

139 Views Asked by At

I am having 2 Branch in Local Repo. I am developing a Utility JAR which compares the two Branch and list down the Changes(Files Changed, added and removed) done by various developers during the release Cycle

Earlier I was using P4 Diff2 command in P4 Command Line to list the changes manually and copy paste the output to excel to make a report. Now I am trying to do the same using Perforce Java API

p4 diff2 -Od //depot/rel1/ //depot/rel2/

Could someone suggest the alternate for Diff2 in Perforce Java API

Thanks in advance

1

There are 1 best solutions below

0
On

If the diff2 command does what you want to do, you probably want to just run that command from P4Java rather than find an alternative to it:

https://www.perforce.com/perforce/doc.current/manuals/p4java-javadoc/com/perforce/p4java/impl/mapbased/server/cmd/Diff2Delegator.html

If you need an alternative because diff2 doesn't do what you need, could you explain what it is you need?