python-2.7perforcep4python

P4Python check if file is modified after check-out


I need to check-in the file which is in client workspace. Before check-in i need to verify if the file has been changed. Please tell me how to check this.


Solution

  • Use the p4 diff -sr command. This will do a diff of opened files and return the names of ones that are unchanged.