日食 +版本控制项目的多次签出
我们使用 eclipse 和 svn。我们将 .project 文件保留在版本控制中。
问题是,如果您有多个签出项目(例如,主干签出和功能分支)并且希望它们都在 Eclipse 中可用,那么您就会失败,因为 .project 文件是相同的,因此不能两者都导入到 Eclipse 中。
处理这个问题的正确方法是什么? (我主要需要在 TI 的 Code Composer v4 中处理这个问题,它使用旧版本的 Eclipse,但我也需要在常规 Eclipse 中执行此操作)
We're using eclipse and svn. We keep the .project file in version control.
The problem is, if you have more than one checked-out project (e.g. a trunk checkout and a feature branch) and would like them both to be available in Eclipse, you lose, because the .project files are identical and therefore can't both be imported into Eclipse.
What's the right way to deal with this? (I'm mostly having to deal with this in TI's Code Composer v4 which uses an older version of eclipse, but I'm also going to need to do this in the regular Eclipse)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议设置单独的工作区来处理多个分支。可以在一个工作空间中完成所有工作,但匆忙时会变得很尴尬。根据您使用的工具,您可能需要关闭当前未处理的分支中的项目,以防止它们干扰。
I recommend setting up separate workspaces for working on multiple branches. It is possible to do it all in one workspaces, but it gets awkward in a hurry. Depending on which tooling you use, you may need to close projects from branches you are currently not working on to keep them from interfering.
从 Eclipse3.3 开始,您会发现以下错误:
[导入/导出] 导入现有项目向导:无法导入同一项目的两个版本
[导入/导出] 导入现有项目向导:重复项目的增强
这两个错误都说明此问题尚未得到修复。
单独的工作区(例如Konstantin中的建议他的答案)是最好的选择。
按照此线程中所述修改
.project
不太实用。Since Eclipse3.3, you find bugs like:
[Import/Export] Import existing projects wizard: can't import two version of same project
[Import/Export] Import existing projects wizards: enhancements for duplicate projects
Both bugs illustrates that this issue hasn't been fixed yet.
Separate workspaces (like Konstantin advices in his answer) is the best option.
Modifying the
.project
as described in this thread is not very practical.我认为修改
.project
是一个解决方案(如果它已经签出)。另一个解决方案是在结帐期间为项目定义不同的名称。
第三种解决方案,也是我使用的一种,是在创建分支时更改源代码管理上的项目名称。
我也更喜欢一个工作空间,这样我的所有偏好都是正确且一致的。
我使用工作集来分隔分支。过去我关闭并重新打开分支的项目,但是窗口工作集是更好的方法,并且大多数视图都很好地支持它。
I think modifying the
.project
is a solution if it already checked out.Another solution is during checkout to define a different name to the project.
Third solution, and the one I use is changing the project name on the source-control when creating a branch.
I also prefer one workspace so that all my preferences are correct and coherent.
I use working sets to separate branches. In the past I was closing and reopening the projects of branches, but window working set is a better approach and most views support it quite good.