views:

290

answers:

4

I've been working with branches for quite some time now, but I always used command-line tools to do the actual merging. However, now I need to do it from Eclipse only. Branching and merging being a widely used feature of SCM systems for many years now, I expected Eclipse to have good had support for it, but it just doesn't seem to be the case.

Currently I'm working on a product that is built up of several projects that need to be branched together. When merging changes from trunk to a branch, normally I would execute the following from the root of the branches checkout: (I'm using Subversion as an example here, but the problems should apply to other SCM tools as well.)

svn update
svn merge ^/trunk
svn commit -m "Merged from trunk"

Maybe fix some conflicts in the middle, but that's about all I have to do. However, in Eclipse I can only merge on the project level, which has the following disadvantages:

  • I cannot merge the contents of the root folder, only the contents of the individual projects. Same goes for updating, BTW.
  • If the project structure is modified on trunk (e.g. a new project has been added), those changes don't get merged at all. Same for update, again.
  • The merge is not atomic. If a commit happens on trunk during the merge, things can get messed up in my working copy. (This can be worked around, but not conveniently.)

These limitations seem pretty straightforward from the fact that Eclipse does not know about the root folder, as it checks out individual projects from SVN.

My question is: am I missing something, or is it really impossible to use Eclipse in a way similar to what I'd do from the command line? And if it is indeed impossible, then how do others cope with this? Does everyone use external tools like the command-line, or TortoiseSVN?

A: 

What you mention is indeed a limitation. I normally checkout the whole folder structure and then import the individual projects into eclipse. When I need to do an operation on the whole repository, I do it outside from eclipse using either the command line or Tortoise SVN.

It is also a pain, that when someone adds a new plug-in (I am developing an Eclipse RCP application), I need to manually add it to the project list as Eclipse does not know about the root of all the projects.

Mario Ortegón
A: 

Your observation is correct. Eclipse manages "team" operations like svn on project level only. So, you're not missing anything ;-)

Yes, you have to use external tools for merging whole branches. Tortoise does it nicely.

Wolfgang
A: 

In Eclipse, SVN branching and merging works nicely for single projects, I have not had any issues when dealing with single projects that have been branched and need to be merged.

However, if multiple projects need to be dealt with a single unit, then this does not seem to be possible to deal with directly in eclipse, each project would need to be dealt with individually.

Sarah Happy
A: 

I would like to recommend you: Subclipse plugin. http://subclipse.tigris.org/

It is very advanced, free SVN tool for Eclipse.

It supports: - merging - branching - multiple-project handling - a very good synchronizing tool (even better than in TortoiseSVN) + resolving mechanism. - other common svn tasks.

rafalmag
Subclipse supports merging only on project level. Lóránt wanted to do this on workspace (root) level, though.
Wolfgang
@Wolfgang says it all: it doesn't even have to be SVN to bump into these problems. Subclipse vs. Subversion is on a different abstraction level, I'm afraid.
Lóránt Pintér