今天在更新项目的时候遇到一个问题,按惯例要cleanup才能从新更新。可是很不幸,在cleanup的时候又遇到了问题!html
svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted
要更新先要cleanup,可是cleanup的失败信息又叫我cleanup……这是一个死循环!本着“内事不决问百度,外事不决问Google”的原则,终于找到一个解决办法,参见这里:http://www.anujvarma.com/svn-cleanup-failedprevious-operation-has-not-finished-run-cleanup-if-it-was-interrupted/
sql
Usually, an svn cleanup fixes most issues with tortoise svn. However, I ran into an issue which caused me some grief.
The specific error I was seeing:
Previous operation has not finished; run 'cleanup' if it was interrupted
Somehow, svn is stuck on the previous operation. We need to remove this operation from it’s ‘work queue’.
The data is stored in the wc.db sqllite database in the offending folder.
1. Install sqllite (32 bit binary for windows) from here数据库
2. sqlite .svn/wc.db “select * from work_queue”windows
The SELECT should show you your offending folder/file as part of the work queue. What you need to do is delete this item from the work queue.ide
3. sqlite .svn/wc.db “delete from work_queue”svn
That’s it. Now, you can run cleanup again – and it should work. Or you can proceed directly to the task you were doing before being prompted to run cleanup (adding a new file etc.)工具
Also, svn.exe (a command line tool) is part of the Tortoise installer – but is unchecked for some reason. Just run the installer again, choose ‘modify’ and select the ‘command line tools’.this
感受这是一个设计上的缺陷:使用工做队列来保存数据,后一个操做依赖于前一个操做的结果,一旦失败就要使用cleanup操做。可是,当cleanup操做失败的时候这个机制就陷入了死循环。解决办法就从它的数据库中直接删除工做队列中的数据,注意是sqlite数据库。spa
因为正在作Android开发,SDK中已经自带了sqlite3.exe工具,所以使用起来很方便。到项目的.svn目录下找到wc.db文件,使用sqlite3打开它,执行如下命令:设计
delete from work_queue;
完毕后关闭数据库,从新打开项目,便可恢复正常操做。