How do you fix the Subversion/Subclipse error "Attempted to lock an already-locked dir"?
Googling shows people routinely encounter this error, and the only solution I've seen posted is to run Subclipse's Team->Cleanup command. Unfortunately, I get this error when I run the Team->Cleanup command. Are there any other options?
Old question, but none of the above solutions worked for me. What did work was to close eclipse, then using Tortoise, right click on the project in Windows Explorer and choose 'TortoiseSVN' -> 'Clean up', then just use the default checkboxed items (Clean up working copy status, include externals), then hit OK.
This cleaned up the folder, then I was able to update and commit files as normal.
Error : Attempted to lock an already-locked dir svn: Working copy 'C:\work\myproject\workspaces\HPDP' locked.
Solution: Worked for me.
Right-click on project-->Team-->Refresh/Cleanup
Just Right Click on Project
Click on Team
Click Refresh/Cleaup
this will remove all the current lock files created by SVN
hope this will help !!!!
Go to the metadata directory as below
your workspace>projectname>.metadata
inside this metada directory, there will be a lock file. Delete this lock file.
Restart eclipse and rebuild project. It worked for me !
I solved this problem by doing these:
Right click on your project.
Click on Team
Click Refresh/Cleaup
svn help unlock
And find locker after all - lock isn't needed in most cases
I tried all suggestion from this thread but the only one that worked is:
use tortoise svn to cleanup with 'break write locks' option checked
After the same problem with "phantom lock" the only solution was:
1) Disconnect the Project Eclipse->Team->Disconnect (select option to delete .svn folder)
2) Than "reconnect" Eclipse->Team->SVN->Share Project. Ignore the warning about better do an checkout. After this all worked fine.
Cleanup and Restart was no solutions, also Scan Locks did not show anything.
I solved a similar problem. SVN client gave me an error:
"svn: E200002: Failed to create new lock."
I tried everything including "Cleanup" and "Still Lock" but with no success. Then I solved the problem simply, I went to my svn server and deleted the locks folder:
at "c:/svn/my_repository/locks"
It turned out that there are broken files in it.
I had similar problem. Team->Refresh/Cleanup Solved my problem
I have faced same problem. I solved this by Right click on project --->Team----> Refresh/cleanup
Using SVN 1.8, deleting lock file does not help (lock file does not exists).
Refresh/Cleanup did not solve either.
What did solve:
1) Backup your directory, just incase...
2) Team... Disconnect. Choose to remove .svn files
3) Add it again to SVN.
Note: In my case, error was due to loss of network connection during initial commit.
I spent hours looking for a solution to the "Attempted to lock an already-locked dir" error I was receiving in IBM RAD. Finally, I guessed to type:
unlock <directory path>
in the RAD console and... volia I could finally syncronize my files!!
I get this too. I go to the directory (not in Eclipse) where the files are, go into the .svn dir and delete the file called lock.
Flip back to Eclipse and continue.
There is a similar question here Problems committing file to SVN repository
Refresh/Cleanup did not work for me. What worked:
1) File -> Switch workspace - choose a different workspace
2) afterwards switch back to the original workspace
We don't have an external SVN server. I was working on a PC with Windows 7 Enterprise, and I was using Eclipse subversion plugin as an SVN client. The problem in my case occurred when the commit of a file took to much time due to network problem that forced me to restart my PC.
After the restart I started getting this error: XXX file already locked.
The solution was to install (TortoiseSVN), right click on the SVN project folder --> TortoiseSVN --> cleanup.
I hope that this post would be a help to someone.
We had the same repeating problem. It's a disaster. What can you do if cleanup and unlock does not help because there is no existing lock?
.svn
folder in your directory structure. It contains a wc.db
file which is an sql lite file.wc.db
file.Source: Stackoverflow.com