开发者

Working on multiple SVN branches in 1 Eclipse Workspace

开发者 https://www.devze.com 2023-01-23 09:29 出处:网络
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:

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.


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.


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.

  • Select all projects
  • click Team → Switch to another branch/tag/revision

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消