在 1 个 Eclipse 工作区中处理多个 SVN 分支
是否可以拥有 1 个包含同一项目的不同分支副本的工作区?假设我有 Project1,它的结构如下:
/trunk/Project1
/branches/1/Project1
/branches/2/Project1
我可以在同一个工作区中拥有 Project 1 的 3 个实例,其中每个 Eclipse 项目都指向主干或任何分支之一吗?基本上我只是想知道是否必须避免为每个分支创建一个新的工作区。
Is it possible to have 1 workspace which contains different branched copies of the same project? Say I have Project1, and it is in this structure:
/trunk/Project1
/branches/1/Project1
/branches/2/Project1
Can I have 3 instances of Project 1 in the same workspace, where each eclipse project points to either the trunk or one of any branches? Basically I am just wondering if I have to avoid creating a new workspace for each branch.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,你可以。只需在 svn 存储库视图中右键单击要签出的所需项目,然后选择“查找/签出为...”并为该项目指定一个唯一的名称。
Yeah you can. Simply right click the desired project you wanna checkout in the svn repository view and select
Find/Check Out As...
and give the project a unique name.实际上,我只需要从主干切换到约 30 个项目的分支,发现 Eclipse 非常智能,允许您通过单个操作完成切换。
它的作用是,它采用所有这些项目的基本 SVN URL 并允许您更改它。因此,就我而言,它们的通用 URL 是
.../trunk
,将其更改为.../branches/mybranch
就足够了。Actually, I just had to switch to a branch from the trunk for ~30 projects and found that Eclipse is very smart and allows you to do the switch in a single operation.
What it does, it takes the base SVN URL for all of these projects and allows you to change it. So, in my case the common URL for them was
..../trunk
and it was enough to change it to.../branches/mybranch
.这个线程有点旧,但我想我应该把它扔掉,自己寻找解决方案。我没有找到具有相同项目名称的方法。但是,如果您导入为 Maven 项目,则会出现一个对话框,可以轻松为多模块项目创建项目名称模板。我在此处放置了屏幕截图。
This thread is a little old, but I thought I'd throw this out, looking for a solution myself. I didn't find a way to have the same project name. But, if you import as a Maven project, there's a dialog that makes it easy to template project names for multi-module projects. I put a screen shot here.