0

i am syncing my workspace file to a previous revision by using sync command as : p4_object.run("sync", "-f", "--parallel=0", "c:\Users\agrahari\Desktop\give\first\test_2.txt#2") it is throwing error: rename: failed to rename c:\Users\agrahari\Desktop\give\first\test_2.txt after 10 attempts: Cannot create a file when that file already exists.

file is there in workspace but with revision #3 synced. please suggest what to do to get it synced with revision #2

manish
  • 43
  • 2
  • 7
  • Does the same thing happen if you simply run `p4 sync -f test_2.txt#2` from the command line? That is, can you verify whether it is or isn't something that you are doing in your P4Python program? In general, that '10 attempts' error arises when the file is in use by some other program at the moment that 'p4 sync' wants to replace the file's contents. – Bryan Pendleton Jan 01 '17 at 16:50

2 Answers2

3

Got the solution. issue was I was not closing the file handler before committing a sync command. thanks.

manish
  • 43
  • 2
  • 7
0

If You are getting this error while Unshelve then select Overwrite option or manually delete the file from explorer and proceed with unshelve