开发者

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 inst开发者_StackOverflowead of on the project level?

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


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.


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).


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 ;-)


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜