SVN 在 Eclipse 中不起作用

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

SVN not working in Eclipse

eclipsesvnsubclipsesubversive

提问by True Soft

One day I pressed in Eclipse Help-> Check for Updates(and I learnt that I should Never Ever update a software which works fine.)

有一天,我按下了 Eclipse Help-> Check for Updates(并且我了解到我永远不应该更新一个运行良好的软件。)

Then in a project that I used with SVN the whole submenu of "Team" and the little icons that showed that some files weren't commited, they all dissapeared.

然后在我与 SVN 一起使用的项目中,“团队”的整个子菜单和显示某些文件未提交的小图标,它们都消失了。

I tried everything:

我尝试了一切:

  • revert from Instalation Historytab
  • uninstall from Installed Softwaretab
  • replaced the folder eclipsein Program Fileswith a new one downloaded from eclipse website and tried to install again
  • searched how to install it on the net
  • Instalation History选项卡还原
  • Installed Software选项卡卸载
  • 替换该文件夹eclipseProgram Files有一个新的日食从网站上下载,并试图重新安装
  • 在网上搜索如何安装它

But in none of the cases above if I press Ctrl+NThere is no SVN group; If i right click on a project and select Team-> Share project, a window with CVS appears, but no SVN. If I choose File-> ImportI can't find SVN anywhere.

但在上述任何一种情况下,如果我按Ctrl+N没有 SVN 组;如果我右键单击一个项目并选择Team-> Share project,则会出现一个带有 CVS 的窗口,但没有 SVN。如果我选择File->Import我在任何地方都找不到 SVN。

If I go to Help-> About Eclipse-> Instalation detailsI see at Instalation Historyin 25.06.2009, 09:59:08 GMT+03:00 (when SVN worked)

如果我去Help-> About Eclipse->Instalation details我看到Instalation History在 25.06.2009, 09:59:08 GMT+03:00(当 SVN 工作时)

Eclipse IDE for Java EE Developers  1.2.0.20090621-0820
Subclipse (Required)    1.6.2
Subversion JavaHL Native Library Adapter (Required) 1.6.3
SVNKit Library  1.3.0.5847

In the Installed Softwaretab I have now installed

Installed Software我现在安装的选项卡中

Eclipse IDE for Java EE Developers  1.2.0.20090621-0820 epp.package.jee
Subclipse (Required)    1.6.5   org.tigris.subversion.subclipse.feature.group
Subversion JavaHL Native Library Adapter (Required) 1.6.6   org.tigris.subversion.clientadapter.javahl.feature.feature.group
SVNKit Library  1.3.1.6109  org.tmatesoft.svnkit.feature.group

How can I make SVN to work?
Where does eclipse store its files, because when I changed the eclipse directory with a new one all my stuff was there (the ones that I installed with no success: SVN, Subversive, Subclipse, SVNKit, ...)

我怎样才能让 SVN 工作?
eclipse 在哪里存储它的文件,因为当我用一个新目录更改 eclipse 目录时,我所有的东西都在那里(我安装没有成功的那些:SVN、Subversive、Subclipse、SVNKit,...)

回答by Paul Lammertsma

Subversiveis my favorite SVN implementation in Eclipse because it works better than the others and it integrates neatly into the UI.

Subversive是我在 Eclipse 中最喜欢的 SVN 实现,因为它比其他实现更好,并且它巧妙地集成到 UI 中。

I suggest you follow these steps:

我建议您按照以下步骤操作:

  1. Downloadthe most recent version of Eclipse (currently Galileo) and extract it to your desired installation location
    • Prior to running Eclipse, make sure you delete (or rename/relocate) your default workspace (under Windows this is workspacein your user directory)
    • Install the Subversive SVN Team Provider (as instructed by the Eclipse incubation website) using Eclipse's software installer:
    • Choose Help, then Install New Software...
    • Create a new download location and specify the following download URL: http://download.eclipse.org/releases/galileo
    • Locate Collaboration, expand it, then check Subversive SVN Team Provider (Incubation)
    • Proceed through the installation and accept the TOS
    • Restart Eclipse and Subversive should prompt you to select a SVN Connector. Reading the symptoms you describe, it sounds like you don't have a connector installed, or it isn't communicating with your team provider. The Polarion websitehas a guide for choosing the connector best suited for you.
  1. 下载最新版本的 Eclipse(当前为 Galileo)并将其解压到您想要的安装位置
    • 在运行 Eclipse 之前,请确保删除(或重命名/重定位)默认工作区(在 Windows 下,这是workspace在您的用户目录中)
    • 使用 Eclipse 的软件安装程序安装 Subversive SVN Team Provider(按照Eclipse 孵化网站的说明):
    • 选择Help,然后Install New Software...
    • 创建一个新的下载位置并指定以下下载 URL: http://download.eclipse.org/releases/galileo
    • 找到Collaboration,展开它,然后检查Subversive SVN Team Provider (Incubation)
    • 继续安装并接受 TOS
    • 重新启动 Eclipse 和 Subversive 应该会提示您选择一个 SVN 连接器。阅读您描述的症状,听起来您没有安装连接器,或者它没有与您的团队提供商进行通信。该Polarion网站有选择最适合你的连接器的导轨。

If you aren't prompted to install a connector, you can always do so from the preferences screen:

如果系统未提示您安装连接器,您始终可以从首选项屏幕执行此操作:

SVN preferences in Eclipse

Eclipse 中的 SVN 首选项

If the above doesn't work for you, it seems that your workspace isn't cleaned out. Locate your defaultworkspace and try getting things working without any projects before you continue.

如果上述方法对您不起作用,则您的工作区似乎没有清理干净。找到您的默认工作区并尝试在没有任何项目的情况下工作,然后再继续。

You could then also try deleting the .eclipsedirectory in your user directory. And starting over from step 3.

然后,您还可以尝试删除.eclipse用户目录中的目录。并从第 3 步重新开始。

回答by Lisandro

The problem I had was that svn icons where not showing in the package explorer.

我遇到的问题是 svn 图标没有显示在包资源管理器中。

The solution for me was to delete the .metadata folder in the workspace folder(which will reset all your workspace including preferences and repository configurations)

我的解决方案是删除工作区文件夹中的 .metadata 文件夹(这将重置您的所有工作区,包括首选项和存储库配置)

After that all the icons appeared.

之后,所有图标都出现了。

回答by Ajay Kumar

I had same issue when SVN connector was not able to connect SVN repository in Eclipse.

当 SVN 连接器无法在 Eclipse 中连接 SVN 存储库时,我遇到了同样的问题。

Then, I do the following step's :-

然后,我执行以下步骤:-

  • Right click on Project under Eclipse.
  • Go to Team -> share Project.
  • 右键单击 Eclipse 下的 Project。
  • 转到团队 -> 共享项目。

It's working :)

它的工作:)

回答by Jay R.

I found a problem related to installing plugins here. I also could not get the SVN stuff to show up in the preferences because of some bug with the software updater updating the Mylin plugins. You'll likely have to get your Eclipse installation straightened out first and you can do this by just using a new workspace. You don't have to blow away the .metadata folder if you point Eclipse temporarily at a new workspace folder. When the Eclipse installation is clean, you can start installing plugins again, but make sure to uncheck the box labeled Contact all update sites during install to find required software

我在这里发现了一个与安装插件相关的问题。由于软件更新程序更新 Mylin 插件的一些错误,我也无法在首选项中显示 SVN 内容。您可能必须首先理顺您的 Eclipse 安装,您只需使用一个新的工作区即可完成此操作。如果您将 Eclipse 临时指向一个新的工作区文件夹,则不必删除 .metadata 文件夹。当 Eclipse 安装干净后,您可以再次开始安装插件,但请确保取消选中标记为Contact all update sites during install to find required software

Eclipse uses local SVN libraries that are part of an installed plugin for SVN support, be it SVNkit or JavaHL. Netbeans uses SVN libraries that are installed independently.

Eclipse 使用本地 SVN 库,这些库是已安装的 SVN 支持插件的一部分,无论是 SVNkit 还是 JavaHL。Netbeans 使用独立安装的 SVN 库。

回答by Chris Johnston

I have had this happen before with Eclipse and the various SVN plugins that it supports. The SVN plugin, for some reason, sometimes looses the SVN connection. Your best bet is to simply delete the project and re-check it out of svn. If you have changes that need to be committed you can use the command line.

我以前在 Eclipse 和它支持的各种 SVN 插件中发生过这种情况。由于某种原因,SVN 插件有时会丢失 SVN 连接。最好的办法是简单地删除该项目并从 svn 中重新检查它。如果您有需要提交的更改,您可以使用命令行。

Another problem you may have is that your plugin and your repository are out of sync in terms of version numbers. I have had problems before using a plugin designed for svn 1.6.x and a repository that was still at svn 1.4 or 1.5.

您可能遇到的另一个问题是您的插件和存储库在版本号方面不同步。在使用为 svn 1.6.x 设计的插件和仍为 svn 1.4 或 1.5 的存储库之前,我遇到了问题。

回答by Ganesa Vijayakumar

Just delete all projects from eclipse and Re-Import the all projects again. It is working for me. Just try it

只需从 eclipse 中删除所有项目并再次重新导入所有项目。它对我有用。就试一试吧

回答by karim

Even if you install everything as it is said, Subversive and SVN Connector (svnkit 1.x.x), in the project you may not see svn working. In my case I had to remove the project from workspace and import it again. Then it appears. (Refresh, clean did not worked).

即使您按照说明安装了所有内容,Subversive 和 SVN Connector (svnkit 1.xx),在项目中您也可能看不到 svn 工作。就我而言,我必须从工作区中删除该项目并再次导入。然后它出现。(刷新,清洁不起作用)。

回答by Robert Greiner

If you want to completely start over with eclipse, you need to delete your workspace as well (the path you see when you first start eclipse). Just re-installing the eclipse files and pointing to the same default workspace will not change anything for you.

如果您想完全重新开始使用 eclipse,您还需要删除您的工作区(您第一次启动 eclipse 时看到的路径)。只需重新安装 eclipse 文件并指向相同的默认工作区不会对您产生任何影响。

Your best bet is to remove eclipse and your workspace and start over because you probably inadvertently broke some other parts of the plug in while you were trying to fix your initial problem.

最好的办法是删除 eclipse 和您的工作区并重新开始,因为您可能在尝试修复最初的问题时无意中破坏了插件的其他部分。