在 Eclipse 中提交失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17575504/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 20:52:21  来源:igfitidea点击:

Commit failed in Eclipse

eclipsesvnvisualsvn-server

提问by gordon613

I am trying to commit one java file in Eclipse Juno Service Release 2 using SVN

我正在尝试使用 SVN 在 Eclipse Juno Service Release 2 中提交一个 java 文件

When I do Team/Commit on the file I get the following.

当我对文件进行团队/提交时,我得到以下信息。

Some of selected resources were not committed.
Some of selected resources were not committed.
svn: E155011: Commit failed (details follow):
svn: E155011: Commit failed (details follow):
svn: E155011: File 'C:\Users\...\workspace\...\src\com\MyCode.java' is out of date

When I try and do Team/Update - whether on the file or the folder or the project, I get

当我尝试执行团队/更新时 - 无论是在文件、文件夹还是项目上,我都得到了

Some resources were not updated.
svn: E175002: chunked stream ended unexpectedly
svn: E175002: REPORT request failed on '/svn/project/!svn/vcc/default'

I have tried

我试过了

  1. Restarting Visual SVN Server
  2. Deleting the .java file and then adding it again
  3. Renaming the .java file, and then renaming it back
  4. Updating the Eclipse and SVN software, and trying again
  5. Team/Revert, Team/Update, making changes, Team/Commit
  1. 重启 Visual SVN 服务器
  2. 删除 .java 文件,然后再次添加
  3. 重命名 .java 文件,然后将其重命名回
  4. 更新Eclipse和SVN软件,再试
  5. 团队/恢复、团队/更新、进行更改、团队/提交

Can anyone help? (all other files/folders etc. work fine)

任何人都可以帮忙吗?(所有其他文件/文件夹等工作正常)

PS This question was copied from https://superuser.com/questions/585724/commit-failed-in-eclipse

PS 这个问题复制自https://superuser.com/questions/585724/commit-failed-in-eclipse

采纳答案by spartikus

You could also just create another workspace, create a new subversion project and download the entire code base from subversion to this new workspace. Then hand copy the .java file over to the new workspace and try to check in. If it works abandon your old workspace.

您也可以创建另一个工作区,创建一个新的 subversion 项目并将整个代码库从 subversion 下载到这个新的工作区。然后将 .java 文件手动复制到新工作区并尝试签入。如果它有效,请放弃旧工作区。

回答by spartikus

you should try a team/cleanup

你应该尝试一个团队/清理

In eclipse rt click the top level folder click team -> cleanup

在 eclipse rt 单击顶级文件夹单击 team -> cleanup

You probably have some .svn file lock you don't know about.

您可能有一些您不知道的 .svn 文件锁。

Another option would be to use the tortoise svn windows plugin if you have it.

另一种选择是使用 tortoise svn windows 插件(如果你有的话)。

tortoise svn download site

乌龟 svn 下载站点

This integrates great with windows and avoids eclipse subversion plugin problems. I have found it to be a nice backup when eclipse acts up.

这与 windows 集成很好,并避免了 eclipse subversion 插件问题。我发现当 eclipse 起作用时,它是一个不错的备份。

回答by vermap

go to team synchronizing view of eclipse > right click on project > Local >cleanup should resolved this issue otherwise create a new work space

转到 Eclipse 的团队同步视图 > 右键单击​​项目 > 本地 > 清理应该解决这个问题,否则创建一个新的工作空间

回答by Weslor

Commit through TortoiseSVN, it will suggest you to do an update, and then you will be able to commit

通过 TortoiseSVN 提交,它会建议你做一个更新,然后你就可以提交了

回答by Lyju I Edwinson

I had the same issue, For one folder I couldn't commit the files. I checked each file and could find that the problem is happening with one file, that I deleted already. I went to the directory where the deleted file is and opened the entry file in the .svn folder within that directory.

我遇到了同样的问题,对于一个文件夹,我无法提交文件。我检查了每个文件,发现问题出在我已经删除的一个文件上。我转到删除文件所在的目录并打开该目录中 .svn 文件夹中的条目文件。

I could see there was an entry for the deleted file and I deleted this entry and saved the file.

我可以看到删除的文件有一个条目,我删除了这个条目并保存了文件。

All works fine after.

之后一切正常。

So it will be better check in each individual file and find the one that causing this issue, then correct the entry or delete this file and recreate it.

因此最好检查每个单独的文件并找到导致此问题的文件,然后更正条目或删除此文件并重新创建它。

回答by lkisac

spartikus' answer should be marked as the answer.

spartikus 的答案应标记为答案。

I experienced the same commit failed message. I had TortoiseSVN installed previously, but started using Eclipse's Subversive plugin. In most cases it works fine, but I've run into issues like this where Tortoise is a good backup and solution.

我遇到了相同的提交失败消息。我之前安装了 TortoiseSVN,但开始使用 Eclipse 的 Subversive 插件。在大多数情况下,它运行良好,但我遇到过这样的问题,其中 Tortoise 是一个很好的备份和解决方案。

After installing TortoiseSVN, you'll see these icons beside all your SVN files and folders.
Tortoise Status Icons

安装 TortoiseSVN 后,您将在所有 SVN 文件和文件夹旁边看到这些图标。
乌龟状态图标

To resolve your issue, open the location of your project folder inside Windows Explorer. Select/Highlight the files that need to be committed, right click 'SVN Commit', enter your commit message and click OK.

要解决您的问题,请在 Windows 资源管理器中打开项目文件夹的位置。选择/突出显示需要提交的文件,右键单击'SVN Commit',输入您的提交消息并单击 OK。