如何解决 Eclipse IDE 中的“同步 CVS”问题?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/856686/
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
How to solve 'Synchronizing CVS' problem in Eclipse IDE?
提问by M3rlino
I'm trying to make an update of one project of mine, but i don't manage. When I try, I get the error
我正在尝试更新我的一个项目,但我没有管理。当我尝试时,我收到错误
'Synchronizing CVS' has encountered a problem.
Problems reported while synchronizing CVS Workspace. 0 of 1 resources were synchronized.
Details:
Problems reported while synchronizing CVS Workspace. 0 of 1 resources were synchronized.
An error occurred synchronizing /<Project name>: The server reported an error while performing the "cvs update" command.
The server reported an error while performing the "cvs update" command.
<project name>: The server did not provide any additional information.
Should I care about this error or not? It looks that everything is fine, but it bothers me.
我应该关心这个错误吗?看起来一切都很好,但它让我烦恼。
Thank you for reading
感谢您阅读
Updated
更新
I discovered that there was one file updated, but that resulted not updated. Another error i was doing it was that i was synchronizing at a project level, in these situations i think it's better to synchronize at folder level and to open CVS Console. To open CVS console press window > open View > console. Then in the console view there is a shell icon it needs to be pressed and then press CVS. Doing like that CVS output it's showed and it helps a bit more.
我发现有一个文件更新了,但结果没有更新。我做的另一个错误是我在项目级别同步,在这些情况下,我认为最好在文件夹级别同步并打开 CVS 控制台。要打开 CVS 控制台,请按 window > open View > console。然后在控制台视图中有一个 shell 图标,需要按下它,然后按下 CVS。像它显示的那样做 CVS 输出,它有更多帮助。
采纳答案by Aaron Digulla
There are several reasons why this can happen:
发生这种情况的原因有多种:
Some other process changed the file and Eclipse hasn't refreshed the workspace. To check, select the file in question and choose "Refresh" from the context menu. This is probably not your problem but it's a common issue, so I wanted to mention it.
There is something wrong on the CVS server (file or directory permissions, failing harddisk, corrupt RAM, etc). You must look into the CVS log file to figure out what might be causing the problem. You should also try to find out which file causes the problem. Check the cvs commit log which files were changed and then update one after the other manually until it breaks.
其他一些进程更改了文件,Eclipse 没有刷新工作区。要进行检查,请选择有问题的文件并从上下文菜单中选择“刷新”。这可能不是您的问题,但这是一个常见问题,所以我想提一下。
CVS 服务器上有问题(文件或目录权限、硬盘故障、RAM 损坏等)。您必须查看 CVS 日志文件以找出可能导致问题的原因。您还应该尝试找出导致问题的文件。检查 cvs 提交日志哪些文件被更改,然后手动一个一个地更新,直到它中断。
As a general rule: If something is broken, you should fix it.
作为一般规则:如果有什么东西坏了,你应该修理它。
回答by Rhea
I was getting the same problem and the reason was that I had a merge conflict on one file and CVS had created the backup versions of the file - (.# files). Once I deleted them, the problem went away. Thought I'd mention this in case someone may run into the same problem.
我遇到了同样的问题,原因是我在一个文件上发生了合并冲突,而 CVS 创建了该文件的备份版本 - (.# 文件)。一旦我删除它们,问题就消失了。我想我会提到这一点,以防有人遇到同样的问题。
回答by William Dutton
Had the error shortly after mering. Here was how I managed to solve it for me:
梅林后不久就出现了错误。这是我设法为我解决的方法:
- Find the bad file causing it.
- Copy the contents by selecting all the text inside eclipse and copying that.
- Replace the file with the latest version from the server.
- Paste in the copied text.
- 找到导致它的坏文件。
- 通过选择 eclipse 中的所有文本并将其复制来复制内容。
- 用服务器上的最新版本替换该文件。
- 粘贴复制的文本。
The override fixes the corruption causing the error and the copying of the text means you not lose the contents.
覆盖修复了导致错误的损坏,复制文本意味着您不会丢失内容。
回答by Mashood
Goto Windows >> Preference >> Network Connections, try with changing active providers - Manual, Direct & Native. I too face the same issue and able to resolve it by adding proxy by pass IP to cvs repos.
转到 Windows >> 首选项 >> 网络连接,尝试更改活动提供程序 - 手动、直接和本机。我也面临同样的问题,并且能够通过通过 IP 向 cvs 存储库添加代理来解决它。
回答by ProgrammersBlock
In addition to removing files that started with .#, I also had to "Overwrite and Update" the file so that Eclipse CVS knew what state it was in.
除了删除以 .# 开头的文件之外,我还必须“覆盖和更新”文件,以便 Eclipse CVS 知道它处于什么状态。
If this happens when updating code, this error could be avoided by synchronizing the workspace first and addressing any merge issues. I realize that this is not an option when switching branches.
如果在更新代码时发生这种情况,可以通过首先同步工作区并解决任何合并问题来避免此错误。我意识到这不是切换分支时的选择。
I've learned to use the files starting with '.#' as the places to clean up. If I've deleted those files, I then go and synchronize folder by folder.
我已经学会了使用以 '.#' 开头的文件作为清理的地方。如果我删除了这些文件,那么我会逐个文件夹同步文件夹。
Afterwards, clean up the old .# files so they are not misleading later.
之后,清理旧的 .# 文件,以免以后产生误导。
In DOS, "del /s .#*"
在 DOS 中,“del /s .#*”
回答by Elye M.
Had the same problem, and solved it when i deleted the content of my workspace/project/WebContent/folder with problem/CVS/Entries, then i refreshed my files in eclipse and it worked.
I guess something there was corrupted.
有同样的问题,当我删除我的工作区/项目/WebContent/文件夹的内容时解决了问题/CVS/Entries,然后我在eclipse中刷新了我的文件并且它工作了。
我猜那里的东西已经损坏了。
回答by Markus Lausberg
Did you change a resource/class outside of eclipse and dont updated the plugin inside of eclipse? When you than call synchronize, eclipse will show an error message.
您是否在 eclipse 之外更改了资源/类并且没有在 eclipse 内部更新插件?当您调用同步时,eclipse 将显示一条错误消息。