恢复 Eclipse Subversion 项目连接

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

Restore Eclipse subversion project connection

eclipsesvn

提问by Ian Dickinson

I have a project in subversion, which I'm developing using Eclipse. I did the original checkout from the svn repository from inside Eclipse. All was well for some weeks then for some unknown reason, Eclipse (specifically: subclipse in Ganymede) no longer recognizes my project as being under svn control. The team context-menu only shows the basic "apply patch" / "share this project" menu options. From the shell, I can still update the project using the svn command line tools, so I know that the svn credentials still work. Other projects under subversion in the same copy of Eclipse still work.

我有一个 subversion 项目,我正在使用 Eclipse 进行开发。我从 Eclipse 内部的 svn 存储库中进行了原始结帐。几周后一切都很好,然后由于某种未知原因,Eclipse(特别是:Ganymede 中的 subclipse)不再将我的项目识别为受 svn 控制。团队上下文菜单仅显示基本的“应用补丁”/“共享此项目”菜单选项。在 shell 中,我仍然可以使用 svn 命令行工具更新项目,所以我知道 svn 凭据仍然有效。同一 Eclipse 副本中 subversion 下的其他项目仍然有效。

I realise that I can delete the local copy and check it out again, but I'd rather understand what has gone wrong - fix the problem, rather than mask the symptoms. Where does Eclipse store its knowledge of which projects are under version control? I looked at the .projectfile and the .settingsdirectory, but couldn't see any obvious mention of svn nature or anything similar, even in the projects that are still working properly.

我意识到我可以删除本地副本并再次检查它,但我宁愿了解出了什么问题 - 解决问题,而不是掩盖症状。Eclipse 在哪里存储其关于哪些项目受版本控制的知识?我查看了.project文件和.settings目录,但看不到任何明显提及 svn nature 或类似内容的内容,即使在仍然正常工作的项目中也是如此。

回答by Paul Whelan

If you are using sublipse as your SVN provider I recommend doing the following

如果您使用 sublipse 作为您的 SVN 提供程序,我建议您执行以下操作

Team -> Share project is usually enough to connect the metadata.

Team -> Share project 通常足以连接元数据。

(that is, assuming that the .svn files are still there which they seem to be if you can work on the command line).

(也就是说,假设 .svn 文件仍然存在,如果您可以在命令行上工作,它们似乎仍然存在)。

Hope this helps as to why this would happen I have no idea

希望这有助于解释为什么会发生这种情况我不知道

回答by jerry

I found an easy way just reimport the project

我找到了一个简单的方法,只需重新导入项目

回答by Jon Schneider

Just doing Team -> Share Project (per the answer to this question provided by @Paul Whelan) did not work for me. The Share Project wizard acted as though the project was not already in SVN (even though the .svn folder was present for my project).

只是做团队 - >共享项目(根据@Paul Whelan提供的这个问题的答案)对我不起作用。共享项目向导的行为就像该项目尚未在 SVN 中一样(即使我的项目存在 .svn 文件夹)。

I ended up resolving the issue by uninstalling the Subversive and JavaHL add-ons (via Help | About Eclipse | Installation Details button | Installed Software tab | Uninstall...), and then reinstalling Subversive. When prompted after restarting Eclipse, I opted to install the SVNKit connector rather than the JavaHL connector.

我最终通过卸载 Subversive 和 JavaHL 附加组件(通过帮助 | 关于 Eclipse | 安装详细信息按钮 | 已安装的软件选项卡 | 卸载...),然后重新安装 Subversive 来解决该问题。在重新启动 Eclipse 后出现提示时,我选择安装 SVNKit 连接器而不是 JavaHL 连接器。

After having done that, when I once again tried Team -> Share Project..., Eclipse correctly recognized that my project was already present in SVN, and it successfully restored the connection.

完成后,当我再次尝试 Team -> Share Project... 时,Eclipse 正确识别出我的项目已经存在于 SVN 中,并且成功恢复了连接。

回答by Ian Dickinson

Addendum: it turns out that my problem manifests when I start Eclipse outside the company vpn, with a project in the workspace that is attached to a svn repository inside the vpn. Fortunately, switching Eclipse svn plugins from subversive to subclipse did solve it.

附录:事实证明,当我在公司 vpn 外启动 Eclipse 时,我的问题就出现了,工作区中的一个项目附加到 vpn 内的 svn 存储库。幸运的是,将 Eclipse svn 插件从 subversive 切换到 subclipse 确实解决了这个问题。

Ian

伊恩

回答by Nathan

From eclipse, I closed the project(s) and reopened which resolved the problem. All by SVN links are back for all projects in my workspace.

从 eclipse 中,我关闭了项目并重新打开,从而解决了问题。所有 SVN 链接都返回到我工作区中的所有项目。

回答by user414944

I had the same problem and this forum helped me in finding the right answer.

我遇到了同样的问题,这个论坛帮助我找到了正确的答案。

My earlier project was configured using subclipse. The new eclipse had subvesive.

我之前的项目是使用 subclipse 配置的。新的日食产生了颠覆性。

Installing subclipse helped me get back the svn options under team!

安装 subclipse 帮助我找回了团队下的 svn 选项!

Hope it helps someone else.

希望它可以帮助别人。

regards

问候

Anshu Prateek

安舒普拉提克

回答by Chelmite

In the Juno release with Subversive, I did:

在 Subversive 的 Juno 版本中,我做了:

  • File/Import brings up the Import popup.
  • From there, select General/Existing Projects in to Workspace.
  • In the next pane, you select the root directory. Then it will show you all the subdirectories. They'll all be selected by default.
  • Unselect the ones you don't want.
  • 文件/导入会弹出导入弹出窗口。
  • 从那里,选择 General/Existing Projects in to Workspace。
  • 在下一个窗格中,选择根目录。然后它会显示所有的子目录。默认情况下,它们都会被选中。
  • 取消选择您不想要的那些。

It will then "import" your existing directory, which can be used in-place they are already located inside your workspace directory.

然后它将“导入”您现有的目录,可以就地使用它们已经位于您的工作区目录中。

回答by rjray

Without knowing what platform you're on, I don't know if your problem is similar to mine. However, I have recently (actually on two different platforms!) had issues where an update to Subversive (or perhaps Eclipse itself, not clear) caused the connectors to no longer load. Without the connectors, Subversive cannot connect to a project. But Eclipse isn't going to lock you out of your project over that, it'll just remove the SVN-related functionality.

不知道你在哪个平台,我不知道你的问题是否和我的相似。但是,我最近(实际上是在两个不同的平台上!)遇到了问题,其中对 Subversive 的更新(或者可能是 Eclipse 本身,不清楚)导致连接器不再加载。没有连接器,Subversive 无法连接到项目。但是 Eclipse 不会因此将您锁定在您的项目之外,它只会删除与 SVN 相关的功能。

Look at the Errors view, which is a log of Eclipse's various errors (class-not-found exceptions, etc.) and see if there are any lines that related to the Subversive components. Unfortunately, I can't really recommend a solution-- on my Mac OSX platform it was enough to re-install the Subversive core elements and connectors. On my Linux machine (possibly due to an OS upgrade) I'm having to completely re-install Eclipse, as too much cruft has accumulated for me to be able to fully investigate it.

查看 Errors 视图,它是 Eclipse 的各种错误(未找到类的异常等)的日志,看看是否有任何与 Subversive 组件相关的行。不幸的是,我真的不能推荐一个解决方案——在我的 Mac OSX 平台上,重新安装 Subversive 核心元素和连接器就足够了。在我的 Linux 机器上(可能是由于操作系统升级),我必须完全重新安装 Eclipse,因为积累了太多的问题,我无法对其进行全面调查。

回答by tishma

Same in my case: .svn dirs were there, but my project didn't support svn actions.

与我的情况相同:.svn 目录在那里,但我的项目不支持 svn 操作。

After a bit of poking it turned out that subversive plugin just disappeared after a forced quitting eclipse.

经过一番摸索,结果发现在强制退出 eclipse 后,颠覆性插件就消失了。

The solution was to (re)install subversive, and now everything is fine again.

解决方案是(重新)安装 subversive,现在一切又好了。

Cheers v.

干杯 v。

UPDATE: I have switched eclipse to a new version that just didn't have the plugin installed, which is the reason why I had to install it from scratch.

更新:我已经将 eclipse 切换到一个没有安装插件的新版本,这就是我必须从头开始安装它的原因。

回答by ranu

This worked for me: right click-> TortoiseSVN -> Settings -> Icon Overlay properties, Selecting Shellas Status Cache. Click Ok, Refresh page.

这对我有用:右键单击-> TortoiseSVN -> 设置 -> 图标叠加属性,选择Shell作为状态缓存。单击确定,刷新页面。