Search code examples
perforcep4v

Skip diff dialog while using p4vc


I would like to compare two p4 files from command line without it opening diff dialogI'm using p4vc

Command: "p4vc diff fileA#1 fileB#2"

This initially opens diff dialog box asking to confirm the files and versions and when I click Diff, it then shows the differences. Is there any way to bypass or skip this intermediate step?

I know I can use other diff tools as default but would prefer to use inbuilt p4 diff tool. Is there anyway to force diff or option to not show the dialog?


Solution

  • I couldn't find a better way to bypass the dialog box using p4vc. From the response I received from perforce forum https://forums.perforce.com/index.php?/topic/5990-bypass-dialog-during-p4vc-diff/, a user suggested using p4merge.

    Steps:

    • p4 print -o fA fileA#1

    • p4 print -o fB fileB#2

    • p4merge fA fB

    This will bring up the p4 diff tool for comparison. The limitation with p4merge is that it can only compare local files which requires the p4 files to be printed into local files and compare them. Network bandwidth can cause slight delays fetching the files from p4.