关于svn 清理失败的解决方法

发布于: 2018-04-23    浏览: 1757    作者:小伍

    今天svn遇到一个头疼的问题,最开始更新的时候失败了,因为有文件被锁住了。按照以往的操作,我对父目录进行cleanup操作,但是cleanup操作也失败了!报错:svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted;

    到google搜索解决问题,最后终于找到一个有效的解决办法。以下是别人的回复:

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

翻译过来就是,通过sqlite将svn中之前的工作队列清空,这样子就可以进行cleanup操作啦。


解决方法

step1:到sqlite官网(http://www.sqlite.org/download.html)下载sqlite3.exe;找到PrecompiledBinariesforWindows,点击sqlite-shell-win32-x86-3080500.zip下载,300KB左右.

step2:将下载到的sqlite3.exe放到某文件目录(我这里是F:\devTools\sqlite3)

step3:然后设置svn源代码文件夹及文件显示所有文件(包括隐藏文件),会发现.svn/wc.db文件,将其复制到step2的目录下

step4:开始->运行->打开cmd命令,跳转到setp2的文件目录中,执行打开wc.db的操作,然后删除里面work_queue表的数据即可,具体见图:

长沙网站设计|长沙手机网站|长沙软件公司|湖南软件开发|长沙软件定制|长沙软件开发|湖南软件公司|长沙微信小程序|长沙网络公司|长沙软件外包公司|长沙竞价托管


step5:将wc.db覆盖到svn源代码目录的.svn目录下(替换原来的wc.db)。

step6:再次对svn目录进行clean操作,即可cleanUp成功。


 ——本文并非原创,如有侵权请联系管理员删除。


在线客服

售前咨询

售后服务

投诉/建议

服务热线
0731-83091505
18874148081