Multi-module projects in Subversion vs. Eclipse

I'm using Eclipse with my projects in an SVN repository in a structure like this:

trunk
 +- module1
 +- module2

Using the Team Synchronization perspective, I can update individual projects, and merge also works on the projects themselves. Is there a way to do the same on the root level instead of on the project level?

I'm using Subversive, but could be persuaded to use Subclipse if it could do this.

Upvotes: 1

Views: 1012

Answers (4)

altern
altern

Reputation: 5949

You might want to use svn:externals property. For example:

  1. Create parent project (only in svn) and two folder in there - module1 and module2
  2. Add svn:external property for module1 folder with path to the module1 repository (svn://serverhost/module1) as a value.
  3. Add svn:external property for module2 folder with path to the module2 repository (svn://serverhost/module2) as a value.

Then you would be able to checkout/commit both whole project and separate modules. Not sure if that what you wanted.

Upvotes: 0

Upgradingdave
Upgradingdave

Reputation: 13066

If your modules are pretty cleanly separated (logically and/or functionally), I've found it helpful to organize my svn repo like this:

module1 (eclipse proj1)
-- trunk
-- branches
-- tags

module2 (eclipse proj2)
-- trunk
-- branches
-- tags

It might seem overkill at first (especially if the modules are small), but I find it helpful to try to maintain a one-to-one relationship between each "trunk, branches, and tags" dir structure in svn and each eclipse project. It lets me tag each module as a different version (when needed) and integrates nicely with build scripts.

If your modules aren't logically separated, then you might want to combine them into one ;-)

Upvotes: 1

matt b
matt b

Reputation: 139931

No. Eclipse thinks in terms of projects, so if you have each module as a project in Eclipse, then Eclipse will think to only synchronize at this folder in SVN.

You could check out from trunk as a new project in Eclipse, and then synchronize this "trunk" project if you would like, although personally I would use an external tool such as TortoiseSVN (or svn from the command line) to prevent any sort of odd conflicts within Eclipse.

Upvotes: 1

cjstehno
cjstehno

Reputation: 13994

Try in the Subversion perspective (or Subversion Explorer, cant remember what its called), rather in the Team sync perspective. In that Perspective you can see the whole repo and you can perform actions on it. That might give you what you want. (note: I always use the subversive plugin for svn stuff).

Upvotes: 1

Related Questions