码迷,mamicode.com
首页 > 其他好文 > 详细

今天遇到奇怪的事:SVN本地代码的标记突然没了,Clean up也报错

时间:2017-07-02 18:27:09      阅读:316      评论:0      收藏:0      [点我收藏+]

标签:命令   href   task   previous   mic   span   ini   路径   bin   

今天遇到奇怪的事:SVN本地代码的标记突然没了。Clean up也报错技术分享

脑子一想这样的情况,能够先把原来的文件夹改一个名字。又一次把代码check out下来,再合并提交更新,但这样也太LOW了吧技术分享

上网上百度了下,发现了两篇文章。提供了解决方式,我的SVN版本号为1.8,实践了方法一。果然奏效了。适用SVN低版本号的方法二有待各位尝试了!

解决方式例如以下:

从SVN库更新项目代码,导致SVN状态异常,更新失败。

通过查阅资料,也有偶尔由于提交代码错误导致的类似问题,都须要在问题路径下运行Clean Up命令来清理。


错误例如以下:
该文件夹下运行CleanUp命令失败。提示“svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted”,解决的方法例如以下:
方法一:
SVN版本号1.7+,须要清理根文件夹下.svn文件夹下wc.db文件里的队列数据记录就可以,命令參考例如以下:
0. 拷贝sqlite3.exe文件到项目文件夹根文件夹下。

1. cmd命令行定位到项目目录下。
2. 运行 sqlite3 .svn/wc.db "select * from work_queue" ,会将block svn正常工作的记录查询出来。
3. 运行 sqlite3 .svn/wc.db "delete from work_queue" 。删除错误数据就可以让Clean Up正常工作。
4. 根文件夹下运行Clean up就可以成功。
方法二:
SVN版本号1.7下面,考虑删除该文件夹下全部lock文件。命令參考例如以下:
0. cd 到svn项目文件夹下。
1. 运行 del lock /q/s 就可以删除lock文件。

2. 根文件夹下运行Clean up就可以成功。


英文文档:

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


sqlite3.exe下载

參考:
1. SVN-Clean up失败。无法进入指定文件路径
网址:http://blog.csdn.net/lfsfxy9/article/details/42297495
2. svn cleanup failed–previous operation has not finished 解决方法
网址:http://www.cnblogs.com/bicker/p/3312394.html



今天遇到奇怪的事:SVN本地代码的标记突然没了,Clean up也报错

标签:命令   href   task   previous   mic   span   ini   路径   bin   

原文地址:http://www.cnblogs.com/zhchoutai/p/7106676.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!