views:

22

answers:

1

I have a few related applications that I want to deploy to different computers. They each share a large body of common code, and have some things unique to them. For example, I have a server and a client which use a lot of common classes to communicate to each other. I have yet more servers and clients which use some of the same classes, but are unrelated from each other.

The easy solution is to just leave them all in the same directory structure so they can all use whichever modules they need, and whenever I deploy a server or a client I put in the entire codebase. However the codebase is quite large, and some of the components use datafiles which are a few megabytes in size.

Ideally I'd be able to have them all share the same code, but be able to deploy just exactly which files each component needs... and they'd all be connected to the same version control. So it'd be something like:

On one computer: svn checkout client1. On another: svn checkout server1. On another: svn checkout client2. Then if I modify some client2 code that is shared between client2 and client1, both will be updated when I do svn update. Also ideally, I wouldn't have to pick out the files I need manually, since that can be annoying, but I can deal with that.

Have other people had this problem? Does it have a better-defined name? What solutions can I use to solve it?

+2  A: 

When it can be broken up in modules, go for a repo / branch with all the 'base' code, and in the actual project, include them as svn:externals (same repository or another one doesn't matter). That way you can independently update / work on modules, pin certain projects to certain revisions of that module or keep them to HEAD.

A new project would either require a branching of a base project with most externals already set, or manual adding of the needed externals. A simple shell script setting the exact externals you need is easily made.

Wrikken