问题
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
回答1:
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
回答2:
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):
Click "Clean up..." as usual and open cleanup popup
check "Break locks"
click "OK" button to execute
回答3:
'svn cleanup' worked for me. You might need to run this as Administrator.
回答4:
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:
- download this zip and copied sqlite3.exe into my working copy folder
- in cmd line, connect to the svn database in this folder:
sqlite3.exe .svn/wc.db
- type command to SQLite to show what's locked up:
sqlite> select * from work_queue;
- type command to SQLite to delete the requests:
sqlite> delete from work_queue;
- repeat step3 to check nothing is locked.
- everything is back normal now!
Screenshot showing step3/4/5:
回答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)
回答6:
Open Totroise SVN Settings. Clear all data on Saved Data tab
回答7:
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.
回答8:
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.
回答9:
Insure that your working directory is not opened in any IDE.
If opened, close that and then do svn clean-up.
回答10:
I got this error too, and I don't want to download sqlite. And finally I solve this by :
- Close my eclipse.(this is important, without this I can't do the next step successfully)
- On your project folder, right click, TortoiseSVN->Clean Up->OK
then I can update and commit without error!
回答11:
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.
回答12:
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:
- Close IDE (don't know if this is needed, but it's a step I took)
- Open File Explorer
- Right click on your project
- Select TortoiseSVN -> Clean up...
来源:https://stackoverflow.com/questions/22715303/svn-error-previous-operation-has-not-finished