I am trying to create a patch between two changelist using p4python. I am not getting any success. Below is my attempt:
$ vi patchp4.py
from P4 import P4,P4Exception
p4 = p4()
#Performed P4 Connection
if p4.connected():
p4.run('diff2','-u','//depot/ran/y/...@changelist1 //depot/ran/x/...@changelist2')
else:
print("Not Connected")
I am getting the below error: $ python3 patchp4.py
[Error]: 'Usage: diff2 [-d<flags> -Od -q -t -u ] file file2'
Missing/wrong number of arguments
On command line same options are working fine, while with python script it is throwing wrong argument error.
On Command Line:
$p4 diff2 -u //depot/ran/y/...@changelist1 //depot/ran/x/...@changelist2
Help me out with better guidance.