p4python: perforce: giving sync command throwing error-: rename: failed to rename <filename> after 10 attempts

4.3k views Asked by At

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

2

There are 2 answers

1
manish On

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

0
Subrat K On

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