Eclipse 与 CVS:相同的模块,多个分支/标签
我开发两个产品,每个产品都驻留在自己的 CVS 模块中;称它们为 B(基础)和 D(从属)。 D 依赖于 B; B可以单独存在。通常,我希望将它们放在我的 IDE 环境中,以便我可以在编辑器和调试器中跟踪从 D 到 B 的 API 调用。这些产品有不同的发布时间表; D 的给定分支/标签依赖于 B 的特定分支/标签。在任何给定时间,我可能正在研究几个不同的 B/D 分支/标签组合。
我是一名 Eclipse 菜鸟,但我相信我们在这里讨论的是多个工作区,每个 B/D 组合一个,每个工作区都有 B 和 D 的项目。我需要能够相对快速地创建这些工作区,而无需每次都完全开始,并且环境不会因工作空间而变化,当然除了分支/标签不同之外。
那么:我必须在 Eclipse 中做什么才能实现我的目标?预先感谢...
马克
I work on two products, each residing in its own CVS module; call them B (Base) and D (Dependent). D is dependent on B; B can exist on its own. Typically I want to have them together in my IDE environment so that I can e.g. follow API calls from D to B in the editor and debugger. These products are on distinct release schedules; a given branch/tag of D is dependent on a specific branch/tag of B. At any given time, I may be working on several different B/D branch/tag combinations.
I'm an Eclipse noob, but I believe what we are talking about here is multiple workspaces, one for each B/D combination, and each with projects for B and D. I need to be able to create these workspaces relatively quickly, without starting completely over each time, and in such a way that the environment does not vary across the workspaces, except of course for the fact that the branch/tags are different.
So: What do I have to do in Eclipse to accomplish my goals here? Thanks in advance...
Mark
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用单独的工作区,但为每个新的 B/D 组合创建一个新的工作区似乎有点不切实际。
我也有类似的情况,虽然我的组合可能较少。我使用一个工作区,在需要时检查每个分支。您可以安全地在 Eclipse 中签出多个分支,只要每个项目名称都是唯一的。当我检查项目名称时,我在项目名称后面添加了一个分支标签,这样我就可以轻松识别正确的版本。
当我处理一种项目组合时,我会关闭之前签出的所有其他项目,这样我就不会错误地编辑错误的版本。您每次必须手动调整的唯一事情是您将在项目的类路径和运行配置中处理哪个依赖项目。
或者,如果您仍然想使用多个工作区,您可以尝试创建一个新的工作区文件夹并将现有工作区的 .metadata 文件夹复制到其中。这将复制您的工作区设置。唯一的缺点是您必须在启动后删除所有项目引用,因为它们不会存在于您的新工作区中。
You can use separate workspaces, but creating a new workspace for each new B/D combination seems a bit impractical.
I am in a similar situation, although I probably have less combinations. I use a single workspace where I check out each branch when I need it. You can safely check out multiple branches in Eclipse, as long as each project name is unique. I add a branch tag after the project name when I check it out so I can easily identify the correct version.
When I'm working on one combination of projects, I close the all other projects that I checked out earlier so I don't edit the wrong version by mistake. The only thing that you have to adjust manually each time is which dependent project you will be working on in your project's classpath and run configuration.
Alternatively, if you still would like to use multiple workspaces you can try creating a new workspace folder and copying the .metadata folder of an existing workspace to it. This will copy your workspace settings. The only drawback is that you have to remove all project references after startup since they won't exist in your new workspace.