Previous operation has not finished; run 'cleanup' if it was interrupted---SVN报错

1 篇文章 0 订阅

转自:http://blog.51cto.com/flyingcat2013/1580692

今天在更新项目的时候遇到一个问题,按惯例要cleanup才能重新更新。但是很不幸,在cleanup的时候又遇到了问题!

   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/

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

Solution:

 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”

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.

3. sqlite .svn/wc.db “delete from work_queue”

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’.

感觉这是一个设计上的缺陷:使用工作队列来保存数据,后一个操作依赖于前一个操作的结果,一旦失败就要使用cleanup操作。但是,当cleanup操作失败的时候这个机制就陷入了死循环。解决办法就从它的数据库中直接删除工作队列中的数据,注意是sqlite数据库。到项目的.svn目录下找到wc.db文件,使用sqlite3打开它,执行以下命令:

  delete from work_queue;

完毕后关闭数据库,重新打开项目,即可恢复正常操作。

下载sqlite3 教程:

https://www.jianshu.com/p/424a8b143bbb

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值