Eclipse 手动“共享项目”?

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

Eclipse "Share Project" by hand?

eclipsesvnsubclipse

提问by jodonnell

What actually happens to the file system when you do a Subclipse Share Project on an Eclipse project that was externally checked out from Subversion? All the .svn folders are already in place. I get an error when I try to Share Project the right way, and I'd rather not delete and re-checkout the projects from the SVN Repository browser.

当您在从 Subversion 外部检出的 Eclipse 项目上执行 Subclipse 共享项目时,文件系统实际发生了什么?所有 .svn 文件夹都已经就位。当我尝试以正确的方式共享项目时出现错误,我不想从 SVN 存储库浏览器中删除和重新检出项目。

回答by Rob Oxspring

Dunno exactly what happens within eclipse, I presume it does some funky stuff in the .metadata directory of the workspace. That said, I would recommend the following to get eclipse to learn about the svn settings of the project:

不知道 eclipse 中到底发生了什么,我认为它在工作区的 .metadata 目录中做了一些时髦的事情。也就是说,我会推荐以下内容来让 eclipse 了解项目的 svn 设置:

  • Delete the project from the workspace (keep "Delete project contents on disk" unchecked)
  • File > Import... > General > Existing Projects into Workspace
  • Browse to the folder containing the original project(s) of interest
  • Import the projects into your workspace
  • 从工作区中删除项目(保持“删除磁盘上的项目内容”未选中)
  • 文件 > 导入... > 常规 > 现有项目到工作区
  • 浏览到包含感兴趣的原始项目的文件夹
  • 将项目导入您的工作区

This seems to have the side effect of subclipse noticing the subversion settings when importing the "new" projects into your workspace.

这似乎具有 subclipse 在将“新”项目导入工作区时注意到颠覆设置的副作用。

回答by Oisin Hurley

The Share Projectaction is intended to commit the first version of a project, i.e. one with no .svnmetadata in place. It will get upset if it sees .svndirectories already there. As Rob wrote, the way to get that checked-out project into Eclipse is to use the import capability.

共享项目的行动旨在提交一个项目,即一个不带的第一个版本的.svn到位的元数据。如果它看到.svn目录已经存在,它会感到不安。正如 Rob 所写,将签出的项目放入 Eclipse 的方法是使用导入功能。

回答by Jay R.

I'm not sure what version of Eclipse you are using or whether this will apply since I'm using Subversive instead of Subclipse. When I use the share project feature to commit the project into svn when I already have all of the .svn directories in place, I get a choice of like "Use current project settings" and then eclipse automatically reattaches the project svn information to the team integration. You can screw it up if you try to enter different information.

我不确定您使用的是哪个版本的 Eclipse 或者这是否适用,因为我使用的是 Subversive 而不是 Subclipse。当我使用共享项目功能将项目提交到 svn 时,当我已经拥有所有 .svn 目录时,我会选择“使用当前项目设置”,然后 Eclipse 会自动将项目 svn 信息重新附加到团队一体化。如果您尝试输入不同的信息,则可能会搞砸。