Why do I keep getting "SVN: working copy of XXXX blocked; try cleanup?

If you used to work with SVN tools in Eclipse (Subversion, subversive), you are probably familiar with the error "working copy of XXX is blocked ...".

I found a very useful post with a workaround for this problem: Working copy of XXX is blocked and cleared in SVN

Like a workaround, it hurts to do it again and again. Does anyone know why I keep getting this error and what steps can I take to prevent it?

Context: I create an Eclipse plugin that includes listening for SVN events, so when testing this plugin I constantly open and close the workspace. Usually I make 1 or 2 commits every time I open the workspace. So often, the commit will fail, and I get a working copy error. I would really like this error to not be repeated again, so any advice is welcome.

Thank!

+45
java eclipse svn eclipse-plugin subclipse
Feb 01 '11 at 17:35
source share
11 answers
  • Choose a project
  • Right click on selected project
  • Command → Cleanup

The problem is resolved.

Note: the above steps will only work Eclipse (Indigo package)

+81
Jul 01 '13 at 6:00
source share

Typically, a .lock file is .lock and it determines the lock / unlock status by checking the existence of this file. I think that if you delete only this .lock file, the problem will disappear.

+14
Feb 01 '11 at 17:53
source share

I had a lot of problems with SVN before, and one thing that definitely caused me problems was changing files outside of Eclipse or manually deleting folders (containing .svn folders) which probably gave me a big problem,

edit You should also be careful not to interrupt SVN operations, although sometimes an error may occur, and this may result in the .lock file not being deleted and therefore your error.

+9
Feb 01 '11 at 17:40
source share

Make sure you clean up exactly what the console says. For example, if a subfolder (package) is locked:

  svn: E155004: Commit failed (details follow): svn: E155004: Working copy 'C:\Users\laura\workspace\tparser\src\de\test\order' locked svn: E155004: 'C:\Users\laura\workspace\tparser\src\de\test\order' is already locked. 

cleaning C: / Users / liparulol / workspace / tparser / src / de / mc / etn / parsers / order

Then you need to clear the specified folder, not the entire project. If you are in eclipse, right-click on the package and not in the project folder and perform a cleanup.

+4
Nov 19 '14 at 8:31
source share

After further research and testing, this problem seems to be caused by debugging the plugin and using breakpoints. SVN / Subclipse, apparently, did not like the presence of control points halfway through their execution, and as a result, these lock files were created. As soon as I started running the plugin, this question disappeared.

+3
Feb 28 '11 at 18:40
source share

This will happen when something goes wrong in one of your folders in your project. You need to find out which folder is locked and run svn cleanup in a specific folder. You can solve this problem as follows:

  • run the svn commit to find out which folder went wrong.
  • change the directory to this folder and run svn cleanup . Then it did.
+3
Apr 7 '16 at 9:19
source share

I had the same problem with the com.xxx.service.model package.

To fix this, I first backed up the code changes in the model package. Then the remote model package and synchronized with the repository. It will show the incoming entire folder / package. Then updated my code.

Finally, paste the old code into the SVN repository. It works great.

+2
Aug 27 2018-11-11T00:
source share

This happened to me when I copied a directory from another subversion project and tried to commit. The promotion was to remove the .svn directory inside the directory I wanted to commit.

+1
Dec 02 '11 at 16:59
source share

The following should unlock a locked working copy (tested on svn version 1.6.11 and elipse version: Mars.2 release (4.5.2))

Step 1: (go to the working copy directory) $ cd working_copy_dir

step 2: (connect to sqlite svn database) $ sqlite3.svn / wc.db

Step 3: (delete all records from the WC_LOCK table) sqlite> delete from WC_LOCK;

Step 4: (disable sqlite 3 database) sqlite> ctrl + d

Step 5: (from the eclipse) right-click on the working copy, then select "Command" → "Update / Clear"

+1
Mar 21 '17 at 19:44
source share

This type of problem can occur when you delete / move files around - essentially making changes to your directory structure. Subversion only checks changes made to files already added to subversion, and not changes made to the directory structure. Instead of using OS copy commands, etc. Most likely use an svn copy, etc. See http://svnbook.red-bean.com/en/1.7/svn.tour.cycle.html

Further, after making the changes, svn first saves a "summary" of the changes in the task list. After performing svn operations in this task list, it locks the file to prevent other changes while these svn actions are performed. If the svn action is interrupted halfway, say during a failure, the file will remain locked until svn can complete the actions in the task list. This can be "reactivated" using the svn cleanup command. See http://svnbook.red-bean.com/en/1.7/svn.tour.cleanup.html

0
Jan 13 '14 at 7:27
source share

Solution: Step1: You must delete the "lock" file, which is present in the hidden ".svn" file. Step 2: If there is no lock file, you will see "we.db", you need to open this database and remove only the contents from the following tables - lock - wc_lock Step 3: Clear the project Step4: Try it now. Step 5: Done.

0
Jan 04 '17 at 14:41
source share



All Articles