How to fix path is not a working copy directory and working copy is already locked errors
A few days ago I was writing some code to generate reports. After the reports were generated, the reports were emailed, then deleted off the server. I made a mistake and deleted the contents of the directory.
This was a bad thing because all of the .svn files were also deleted. I tried to replace the directory contents with the latest from SVN and I got an error. I tried to update my working copy and got an error. No matter how I interacted with SVN, I got one of the following errors:
- Path is not a working copy directory
- Working copy is already locked
- Working copy '[directory]' is missing or not locked
To fix this:
I manually removed the directory entirely from my local copy. Then I updated to HEAD from SVN. This created the directory I accidentally deleted, put the files back and also added in the .svn files that were missing (and causing the working copy errors)
Apparently, if the directory exists, and SVN doesn't find the .svn files it is looking for, it gets confused. Removing the directory is enough for it to recreate it. (Since the missing directory was tracked in the parent directory .svn files)
Hope this helps you out!
There are no comments for this entry.


Thanks, that worked and was easy! I had to copy the contents of the "bad" folder back into the new one, rather than just copying the whole folder again.
From Tortoise menu: Release lock
With Path too long error I use "Long Path Tool" to get fast and easy fix .
Hi
I suggest to try "Long Path Tool" program .
before I have problem cannot copy file because file name too long. and after I found long
path tool and now my problem solved
Thanks
Patrick
Hi
I suggest to try "Long Path Tool" program .
before I have problem cannot copy file because file name too long. and after I found long
path tool and now my problem solved
Thanks
Patrick
Long Path Tool works well to copy or delete long path files, you may use it and I m sure you will love it.
Long Path Tool works well to copy or delete long path files, you may use it and I m sure you will love it.
Howsoever long the path may be, you can always rely on Long Path Tool. Its sure to sort out your problem.
Howsoever long the path may be, you can always rely on Long Path Tool. Its sure to sort out your problem.
You can also use Long Path Tool to sort out this problem.
I've done that before! I find it's always a good idea to interact with any files (delete, rename, move, etc.) under version control through SVN. TortoiseSVN on Windows makes this easy with it's shell integration.