What causes this problem
Occasionally, when a commit, add, or another SVN action fails, it’ll lock itself. It does this so it cannot be corrupted by other subsequent failures. I’ve mostly experienced this while using TortoiseSVN. I bet it can happen in other clients or via the CLI as well.
You can know you’re in this situation when you get a message like this:
svn: Working copy ‘/myrepo/repodirectory’ locked
svn: run ’svn cleanup’ to remove locks (type ’svn help cleanup’ for details)
Every now and then it won’t tell you to try to execute a cleanup to fix the issue. This can be frustrating.
How to fix it
Running svn cleanup typically fixes your problem.  If not, you will need to make sure you are at the root of your repository. For example, if you are in ‘/myrepo/repodirectory,’ you will need to ‘cd ..’ so that you are at ‘/myrepo’ and then try executing ‘svn cleanup’ again.
Here’s an example of what I had to do to fix this issue:
C:\myrepo\repodirectory> cd ..
C:\myrepo> svn cleanup
Its nice when fixing something is as simple as a svn cleanup.
Leave a reply to Devapriya Cancel reply