Eclipse,SVN的麻烦
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4970060/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse, SVN trouble
提问by whatswrong
A have copied a folder from one project, which is generated by system to another. Now I want to commit all stuff from the project, the folder was copied to. What I get is (that copied folder is in folder /webapp):
A 已将系统生成的一个项目中的文件夹复制到另一个项目中。现在我想提交项目中的所有内容,文件夹已复制到。我得到的是(复制的文件夹在文件夹/webapp 中):
org.tigris.subversion.javahl.ClientException: Attempted to lock an already-locked dir svn: Working copy '/home/user/webshop/webshop-impl/src/main/webapp' locked
org.tigris.subversion.javahl.ClientException:试图锁定一个已经锁定的目录 svn:工作副本“/home/user/webshop/webshop-impl/src/main/webapp”被锁定
Ok, I tried to Team->Cleanup and got:
好的,我尝试 Team->Cleanup 并得到:
org.tigris.subversion.javahl.ClientException: Path is not a working copy directory
svn: '/home/user/webshop/webshop-impl/src/main/webapp/gwtmodules' is not a working copy directory
org.tigris.subversion.javahl.ClientException: Path is not a working copy directory
svn: '/home/user/webshop/webshop-impl/src/main/webapp/gwtmodules' is not a working copy directory
This eclipse SVN client is messing with me long time with this darn tigris exceptions =)
这个 Eclipse SVN 客户端因为这个该死的底格里斯河异常困扰了我很长时间 =)
Please, help with advice :) What am I doing wrong?
请帮助提供建议:) 我做错了什么?
回答by James Drinkard
This had me baffled as well when I got this error. This happens if we have some pending sessions on committing our changes so we'll need to do some clean up before we'll have another try on a commit.
当我收到此错误时,这也让我感到困惑。如果我们在提交更改时有一些待处理的会话,就会发生这种情况,因此我们需要在再次尝试提交之前进行一些清理。
This is the fix:
这是修复:
In STS or eclipse, right click on the offending project, click Team and then select Refresh/Cleanup. SVN gets the offending .lock files and deletes them. You can also do this from the command line.
在 STS 或 eclipse 中,右键单击有问题的项目,单击 Team,然后选择 Refresh/Cleanup。SVN 获取有问题的 .lock 文件并删除它们。您也可以从命令行执行此操作。
回答by fmucar
You should delete .svn folders which contains repo info after you copy a directory to another place.
将目录复制到另一个位置后,您应该删除包含 repo 信息的 .svn 文件夹。
You are probably seeing it because the copied directory has some svn file which points to some place that does not match to the new location.
您可能会看到它,因为复制的目录有一些 svn 文件,该文件指向与新位置不匹配的某个位置。
回答by Captain Spandroid
I would do an svn export
from the first project. This will give you a clean copy of the code without any of the associated svn metadata. You can then add the exported code into the second repository.
我会svn export
从第一个项目中做一个。这会给你一个干净的代码副本,没有任何相关的 svn 元数据。然后,您可以将导出的代码添加到第二个存储库中。
回答by St. Louski
It is very likely that your folder is lack of svn info(my case). To fix it, you can copy svn info from other folders, and then modify the snv file(all-wcpropc,entries) to the correct one. I am not sure it is the recommended way, but it works for me!
您的文件夹很可能缺少 svn 信息(我的情况)。要修复它,您可以从其他文件夹复制 svn 信息,然后将 svn 文件(all-wcpropc,entries)修改为正确的文件。我不确定这是推荐的方式,但它对我有用!