您当前的位置: 首页 > 

Dongguo丶

暂无认证

  • 2浏览

    0关注

    472博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

svn报错:“Previous operation has not finished; run ‘cleanup‘ if it was interrupted“ 的解决方法

Dongguo丶 发布时间:2018-10-24 11:45:06 ,浏览量:2

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

   svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted

要更新先要cleanup,但是cleanup的失败信息又叫我cleanup……这是一个死循环!本着“内事不决问百度,外事不决问Google”的原则,终于找到一个解决办法,参见这里:svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted - Anuj Varma, Hands-On Technology Architect, Clean Air Activist

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数据库文件里面存储了svn的operation,表名是work_queue。

       .db数据库文件可以用sqlite3打开。到网上下载sqlite3.exe,解压到D:\Offsite\.svn文件夹下,解压后的sqlite3.exe才475KB大小。

       1. 运行cmd,进入到D:\Offsite\.svn文件夹下,执行sqlite3 wc.db,打开数据库

          

           

        2. 执行.table 可以查看表名

           

        3. 执行delete from work_queue; 命令。

            

         4. 重试 clean up 操作,问题解决。

关注
打赏
1638062488
查看更多评论
立即登录/注册

微信扫码登录

0.0400s