当我做svn更新时,我得到这个错误:

工作副本XXXXXXXX锁定请 执行“清理”命令

当我清理的时候,我得到

处理失败 以下路径:XXXXXXXX

我怎样才能跳出这个循环呢?


当前回答

查看您的.svn文件夹,其中将有一个名为lock的文件。删除该文件,您将能够更新。每个子目录的.svn目录下可能存在较多的锁文件。它们也需要删除。这可以作为批处理从命令行非常简单地完成,例如。

find . -name 'lock' -exec rm -v {} \;

注意,您正在手动编辑.svn文件夹中的文件。他们被放在那里是有原因的。这个理由可能是错误的,但如果不是的话,你可能会破坏你的本地副本。

来源:http://www.svnforum.org/2017/viewtopic.php?p=6068

其他回答

不要删除您的解决方案!

在.svn文件夹中有一个名为lock的文件,长度为0字节

您可以从解决方案中的所有.svn文件夹中删除所有这些文件,这样就可以工作了

这对我来说是有效的

Spotlight在递归查找锁文件方面是它通常的垃圾。

EasyFind在Mac App Store上运行良好

http://itunes.apple.com/gb/app/easyfind/id411673888?mt=12

搜索“lock”

全选/删除

While doing svn update using tortoise svn, the process got interrupted and stopped complaining the file is in use. Next it asked me to use CleanUp command on the folder. I tried to run CleanUp command but it failed to do so. Then I found a command shell which was using the folder files. So, I closed the command shell and checked if any editor is using the files related to it. We need to close them as well. Again, I tried CleanUp on the folder with options Break locks,revert changes,clear working copy status . The CleanUp went successfully. Then finally able to update my svn folder.

对我来说,这其实是乌龟的错。Tortoise只是抱怨“不能清理,运行清理”,但是当我运行命令行(svn cleanup)时,它清楚地告诉我它不能删除一些正在使用的文件,解决方案是显而易见的。一旦我关闭Visual Studio(它保持文件打开),那么清理工作就很好了。

其他程序也可以在repo中保持文件打开,从而导致此问题。在另一个例子中,Excel保持xls打开是罪魁祸首,所以关闭所有可能在repo中使用任何东西的程序,甚至重新启动以强制程序关闭,然后再次尝试清理,这可能是明智的。

在Mac OS下的版本: 清除工作副本锁…