如何在 Eclipse 中打开现有的 SVN 项目

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

How to Open an Existing SVN Project in Eclipse

eclipsesvn

提问by Guido Anselmi

I just started a new project which has previously been developed in Eclipse. I have not used Eclipse since 2006 and it was for a short non-SVN-controlled project at that time. I have extensive experience with NetBeans and Visual Studio.

我刚刚开始了一个以前在 Eclipse 中开发的新项目。自 2006 年以来我就没有使用过 Eclipse,当时它用于一个简短的非 SVN 控制的项目。我在 NetBeans 和 Visual Studio 方面拥有丰富的经验。

The code base is in an SVN repository. I have installed Eclipse (Helios) and TortiseSVN and downloaded the source. I see that there is a .project file and that it contains some eclipse references.

代码库位于 SVN 存储库中。我已经安装了 Eclipse (Helios) 和 TortiseSVN 并下载了源代码。我看到有一个 .project 文件,它包含一些 eclipse 引用。

I would like to import the project so that I can edit the files under SVN control. I would then like to either commit the files via the Tortoise client, or more ideally, directly in Eclipse.

我想导入项目,以便我可以在 SVN 控制下编辑文件。然后我想通过 Tortoise 客户端提交文件,或者更理想的是,直接在 Eclipse 中提交文件。

I have already reviewed a couple of web sites and questions on this forum, but have not been able to find a how to for this particular use case.

我已经在此论坛上查看了几个网站和问题,但无法找到针对此特定用例的方法。

采纳答案by no.good.at.coding

Note

笔记

  • You'll find the commands for SVN under the Teamsub-menu when you right click on your project.

  • I've had trouble in the past when connecting to SVN repositories using the svn+ssh://protocol - a quick fix is to change the SVN interface(under Window > Preferences > Team > SVN) to the pure Java option (SVNKit IIRC).

  • Team当您右键单击您的项目时,您将在子菜单下找到 SVN 的命令。

  • 过去我在使用svn+ssh://协议连接到 SVN 存储库时遇到了问题- 一个快速的解决方法是将SVN interface(在 下Window > Preferences > Team > SVN)更改为纯 Java 选项 (SVNKit IIRC)。

回答by ROMANIA_engineer

Eclipse Mars (4.5.1)

日食火星 (4.5.1)

  1. Install an SVN pluginfrom Help > Eclipse Marketplace... > type "Subversive" or "Subclipse" > press Enter > click on Install

    Help Eclipse MarketplaceEclipse Marketplace

  2. Go to File > New > Project...> type "SVN" > select "Checkout Projects from SVN" or "Project from SVN" (it depends on the installed plugin(s)) > select repository > Next > select project > Finish

    File New Project

    Checkout Projects from SVN

  1. 从 Help > Eclipse Marketplace...安装一个SVN 插件> 输入“Subversive”或“Subclipse”> 按 Enter > 点击 Install

    Help Eclipse MarketplaceEclipse Marketplace

  2. 转到文件>新建>项目...>输入“SVN”>选择“从SVN签出项目”或“从SVN项目”(这取决于安装的插件)>选择存储库>下一步>选择项目>完成

    File New Project

    Checkout Projects from SVN

回答by gotomanners

Make sure you have the svn plugin installed see here - http://www.eclipse.org/subversive/downloads.php

确保您安装了 svn 插件,请参见此处 - http://www.eclipse.org/subversive/downloads.php

  • From Eclipse's File menu, choose Import to display the import manager.
  • Choose Checkout Projects from SVN
  • Create a new location
  • Enter your repository url
  • Hit finish
  • 从 Eclipse 的文件菜单中,选择导入以显示导入管理器。
  • 从 SVN 中选择 Checkout 项目
  • 创建新位置
  • 输入您的存储库网址
  • 击中完成

回答by Andrey Adamovich

You can do it directrly from Eclipse if you install Subclipseor Subversiveplugin. Then you can either reimpoort your project into workspace or use Team -> Share option in context menu (right-click) of the project.

如果你安装SubclipseSubversive插件,你可以直接从 Eclipse 中完成。然后,您可以将项目重新导入工作区,也可以在项目的上下文菜单(右键单击)中使用 Team -> Share 选项。