Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Working on multiple SVN branches in 1 Eclipse Workspace

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.

like image 488
Zombies Avatar asked Oct 31 '10 18:10

Zombies


People also ask

How do I merge two SVN branches in eclipse?

Merging means creating a version by blending different revisions of resources. To start merging click 'Team>Merge...' menu item of the resource pop-up menu, 'Merge...' menu item of the SVN main menu group or on the 'Merge...' button on the 'SVN Toolbar'.

Why is Eclipse SVN Team menu not showing all options?

Try to import the original project as an SVN Project (through File>Import...) directly from the repository (use a new project name if you get conflicts). Verify that the Team menu is working for this project.


3 Answers

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.

like image 117
z00bs Avatar answered Oct 11 '22 09:10

z00bs


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.

like image 42
Nikolai Grigoriev Avatar answered Oct 11 '22 08:10

Nikolai Grigoriev


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.

like image 45
Alper Akture Avatar answered Oct 11 '22 09:10

Alper Akture