9

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.

Zombies
  • 25,039
  • 43
  • 140
  • 225

3 Answers3

7

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.

Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
7

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.

z00bs
  • 7,518
  • 4
  • 34
  • 53
  • 1
    That is one way. However if anything depends on the project folder having a specific name this could be problematic. – Zombies Oct 31 '10 at 18:49
  • Of course. But since I didn't see this precondition in your question I didn't take it into account. – z00bs Oct 31 '10 at 18:53
  • 7
    Eclipse itself doesn't support having projects with the same name in the same workspace. If that is a requirement for you, you'll need different workspace. Subversion isn't imposing that requirement though. – Jeanne Boyarsky Oct 31 '10 at 22:57
  • 1
    What you could do is creating two different workspaces (or as many as you need) and open each in a new eclipse instance. This might be useful for your use case. – z00bs Nov 01 '10 at 07:07
3

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.

Alper Akture
  • 2,445
  • 1
  • 30
  • 44