将现有 Eclipse 项目与现有 SVN 存储库关联
我的硬盘上有一个 Eclipse 项目,这是最近从 SVN 存储库中签出的项目。我已将此项目导入到我的 Eclipse 工作区中,现在希望将其与 SVN 存储库关联。
我该怎么做?我似乎在右键单击下唯一的选项 ->团队是“共享项目”,这似乎只允许我进行初始导入。
编辑:动机 - 这是一个较大的存储库,我真的不想通过网络导入整个内容。
编辑2:(由于某种原因)项目中没有.svn目录。所以也许从 svn 重新导入是唯一的选择
I have an eclipse project on my hard disk, which is a fairly recent check out from an SVN repository. I've imported this project into my Eclipse workspace, and now want to associate it with the SVN repository.
How do I do this? The only options I seem to have under Right-click -> Team is "Share Project", which only seems to allow me to do an initial import.
Edit: Motivation - It's a largish repository, and I don't really want to have to import the whole thing over the network.
Edit 2: There are (for some reason) no .svn dirs in the project. So maybe a fresh import from svn is the only option
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
团队->共享项目
正是您需要做的。从列表中选择SVN,然后单击“下一步”。 Subclipse 将注意到 .svn 目录的存在,并要求您确认信息是否正确,并将项目与 subclipse 相关联。Team->Share project
is exactly what you need to do. Select SVN from the list, then click "Next". Subclipse will notice the presence of .svn directories that will ask you to confirm that the information is correct, and associate the project with subclipse.我只是想补充一点,如果你没有看到团队 ->共享项目,您可能必须先从工作区中删除该项目,然后才能将其重新导入。这就是我遇到的情况,我必须将其删除并重新添加到工作区中才能自行修复。 (当使用相同的工作空间从截然不同的 Eclipse 版本 + 插件迁移时会发生这种情况。)
subclipse 未在 eclipse 中的项目上下文菜单上显示“共享项目”选项
I just wanted to add that if you don't see Team -> Share project, it's likely you have to remove the project from the workspace before importing it back in. This is what happened to me, and I had to remove and readd it to the workspace for it to fix itself. (This happened when moving from dramatically different Eclipse versions + plugins using the same workspace.)
subclipse not showing "share project" option on project context menu in eclipse
我经常被问到这个问题,如果 Eclipse 项目已与存储库中的 SVN 对应项断开连接,那么使用“共享项目...”是否明智。因此,我将我的答案附加到该线程中。
SVN-Team 选项“共享项目...”对于 SVN 和 Eclipse 工作区中存在的项目来说完全没问题,即使 Eclipse 项目缺少隐藏的 .svn 配置。您仍然可以连接它们。 Eclipse SVN 实现 (Subclipse/Subversive) 将验证提供的 SVN http(s) 源是否已填充。如果是,所有现有文件将被复制并链接(以 SVN 术语检出)到您非常个人的 Eclipse 工作区。
警告:
问候,
费德
I'm asked this question very frequently, if it's smart to use "Share project..." if a eclipse project has been disconnected from it SVN counterpart in the repository. So, I append my answer to this thread.
The SVN-Team option "Share project ..." is totally fine for projects that exist in SVN and in your Eclipse workspace, even if the Eclipse project is missing the hidden .svn configuration. You can still connect them. Eclipse SVN-implementation (Subclipse/Subversive) will verify if the provided SVN http(s) source is populated. If yes, all existing files will be copied and linked (checked out in SVN terms) to your very personal Eclipse workspace.
Word of caution:
regards,
Feder
我遇到了同样的问题。我使用 Tortoise 客户端签出,然后尝试使用导入向导在 Eclipse 中导入项目。 Eclipse 无法识别 svn 位置。我尝试了上面帖子中提到的共享选项,它尝试将这些项目提交到 SVN 中。但我的问题是版本不匹配。我在eclipse中选择了svn 1.8版本(我在eclipse中使用1.7,在tortoise中使用1.8.8),然后重新导入项目。它没有任何问题地解决了。
I came across the same issue. I checked out using Tortoise client and then tried to import the projects in Eclipse using import wizard. Eclipse did not recognize the svn location. I tried share option as mentioned in the above posts and it tried to commit these projects into SVN. But my issue was a version mismatch. I selected svn 1.8 version in eclipse (I was using 1.7 in eclipse and 1.8.8 in tortoise) and then re imported the projects. It resolved with no issues.
我正在使用 Tortoise SVN 客户端。您也可以从 SVN 的某个文件夹中查看所需的项目。您可以在项目内看到一个 .SVN 文件夹。将 .SVN 文件夹复制到工作区文件夹中。现在从 Eclipse 中删除该项目并将其再次导入到 Eclipse 中。现在你可以看到该项目现在已经与 svn 关联了
I am using Tortoise SVN client. You can alternativley check out the required project from SVN in some folder. You can see a .SVN folder inside the project. Copy the .SVN folder into the workspace folder. Now remove the project from eclipse and import the same again into eclipse. You can see now the project is now associated with svn
对于 SVN 服务器,您必须创建包含所有项目的中央存储库。可以使用Team/Share命令上传存储库的内容;如果是 Subversive 客户端,它会在导入后自动运行提交,以便您可以上传文件。
使用集中式版本管理系统(例如 SVN)无法以任何方式规避此步骤。
In case of SVN servers you have to creating a central repository with all projects. The contents of the repository can be uploaded with the Team/Share command; in case of the Subversive client it automatically runs a commit after the import, so you can upload your files.
This step cannot be circumvented in any way using a centralized version management system such as SVN.
试试这个 - 关闭项目然后打开它。如果项目是从有效的 svn 路径中签出的,它会自动与 svn 链接。
Try this- Close the project then open it. It links with svn automatically,if project was checked out from valid svn path.