Question

This morning i was committing several items to a svn repository. During the commit operation my operating system crashed and now all svn commands (Including clean up) ends up with the same error.

Previous operation has not finished; run 'cleanup' if it was interrupted
Please execute the 'Cleanup' command."

I dont get other errors like Subversion stuck due to "previous operation has not finished"? and as the repository is very i big i dont want to checkout everything again like suggested here: Issues with previous operation not finishing

Was it helpful?

Solution

Actually just found the answer to my question by looking here

It seems that svn was stuck in the old operation. All of these operations are stored in the database wc.db in the .svn folder.

By downloading SQLite to my checkout directory and running

sqlite3.exe .svn/wc.db "select * from work_queue"

from cmd

i got a list of all pending operations. These operations are the ones "not finished" then by running

sqlite3.exe .svn/wc.db "delete from work_queue"

all of these pending operations are deleted and i can commit again. No need for a re checkout or anything

OTHER TIPS

I tried all the solutions listed in this page, but my problem still didn't work out.

I solved it by another way. Just in case some still didn't get a solution, try this (I'm using TortoiseSVN 1.9.5):

  1. Click "Clean up..." as usual and open cleanup popup

  2. check "Break locks"

  3. click "OK" button to execute

'svn cleanup' worked for me. You might need to run this as Administrator.

I tried the top solution by Sigurd V, but the SELECT query gave me errors. I'm using SVN 1.9.2 and SQLite 3.13.0.

To clarify, the file to download from SQLite site is "sqlite-tools-win32-x86-3130000.zip(1.51 MiB)"

Here is what I did with help form our software eng:

  1. download this zip and copied sqlite3.exe into my working copy folder
  2. in cmd line, connect to the svn database in this folder: sqlite3.exe .svn/wc.db
  3. type command to SQLite to show what's locked up: sqlite> select * from work_queue;
  4. type command to SQLite to delete the requests: sqlite> delete from work_queue;
  5. repeat step3 to check nothing is locked.
  6. everything is back normal now!

Screenshot showing step3/4/5:

step 3/4/5

  • Close all files or programs using anything from your repository (this will unlock the svn to cleanup)

  • Run 'svn cleanup' against your working copy (show us the result if it errors our)

Open Totroise SVN Settings. Clear all data on Saved Data tab

I have seen a lot of threads and answer to the same question. What I saw most is "Run Cleanup" to the top level of the directory. But I have tried it most and Still I got the error. So What I did is to resolve it to the completion.

  • Install sqllite (32 bit binary for windows). Put the exe in the folder where the top level .svn directory resides.

  • sqlite .svn/wc.db “select * from work_queue”;

  • delete from work_queue;

Execute these three statements and after this run cleanup. It will run without any hassel.

I got this error too, and I don't want to download sqlite. And finally I solve this by :

  1. Close my eclipse.(this is important, without this I can't do the next step successfully)
  2. On your project folder, right click, TortoiseSVN->Clean Up->OK

then I can update and commit without error!

I am able to solve it in the following way.

1) Go to The directory where you are not able to successfully clean up via svn.(Root folder or child folder).

2) Select .svn folder in the directory, cut that folder and paste it in the separte drive or separate location (out of svn directory)

3) Now, go to the directory - right click and select TortoiseSVN->Repository-browser.

4) And,Checkout the folder. (It will not perform fresh checkout)

5) All your items will be versioned again, and it will repair the internal issue of svn, and problem should be solved.

Insure that your working directory is not opened in any IDE.

If opened, close that and then do svn clean-up.

In case someone else is also facing this issue he can use below options.

go to SVN -> cleanup (GUI) and select below 3 options.

It will definitely work.

enter image description here

  • Run svn cleanup against your working copy (show us the result if it errors our)

    or

  • Checkout a fresh working copy using svn checkout command and copy your changes from the broken wc to this one. Run commit again via the new working copy.

This happened to me - I didn't want to do anything as drastic as deleting my .svn file. However, svn cleanup in my IDE was not resolving the problem.

What worked for me:

  1. Close IDE (don't know if this is needed, but it's a step I took)
  2. Open File Explorer
  3. Right click on your project
  4. Select TortoiseSVN -> Clean up...
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top