We are currently considering to move away from CVSNT, very probably to Subversion (because we are already using trac, which is well-prepared for SVN-integration). As we have been making rather extensive use of some less common CVS(NT)-features a couple of questions arose very early on. This is but the first of them.
Here's the scenario: (For the impatient: My actual question is at the very bottom of this post below the horizontal ruler.)
All of our "projects" share some common code. The directory hierarchy inside the CVS repository looks somewhat like this (simplified - hopefully not too much so):
- Libs
- Lib1
- Lib2
- External
- ExtLib1
- Docs
- Source
- ExtLib2
- Docs
- Source
- ExtLib1
- ProjectA
- ProjectB
...where ProjectA might for example be dependent on Lib1, Lib2, ExtLib1 and ExtLib2 and ProjectB dependent on Lib1 and ExtLib1 (actually this might be because Lib1 itself depends on ExtLib1). We modelled this by using the CVSROOT/modules
file like so:
ExtLib1Full -d Lib/ExtLib1Full External/ExtLib1
ExtLib1Src -d Lib/ExtLib1/Source External/ExtLib1/Source
ExtLib2Full -d Lib/ExtLib2Full External/ExtLib2
ExtLib2Src -d Lib/ExtLib2/Source External/ExtLib2/Source
Lib1 -d Lib/Lib1 Libs/Lib1
Lib1_WDeps -a ExtLib1Src Lib1
Lib2 -d Lib/Lib2 Libs/Lib2
Lib2_WDeps -a Lib2
ProjectAMain -a ProjectA
ProjectALibs -a Lib1_WDeps Lib2_WDeps ExtLib2
ProjectAFull -a ProjectAMain ProjectALibs
ProjectALibs_OursOnly -a Lib1 Lib2
ProjectAFull_OursOnly -a ProjectAMain ProjectALibs_OursOnly
ProjectBMain -a ProjectB
ProjectBLibs -a Lib1_WDeps
ProjectBFull -a ProjectBMain ProjectBLibs
ProjectBLibs_OursOnly -a Lib1
ProjectBFull_OursOnly -a ProjectBMain ProjectBLibs_OursOnly
For a build of ProjectA the build server would now simply have to check out the virtual module named "ProjectAFull" to get all interdependent modules needed for that particular build - and even create the directory structure favoured by the compiler (i.e. external and internal libs both placed below a common "Lib" parent folder). Likewise when we want to tag a release including all dependencies we would simply use cvs rtag -rTagName ProjectAFull
. When producing a ChangeLog we would use the output of cvs rlog ProjectAFull_OursOnly
in order not to let the ChangeLog be polluted by commit messages from the external libraries (which we maintain using cvs import
and vendor branches).
Is there an equivalent of these virtual modules in SVN? How should I set up the directory structure inside the new SVN repository to accommodate for this? Should each project and library become its own SVN project (i.e. with its own set of "trunk", "tags" and "branches" folders) or should I simply import the existing directory structure as-is? How do I define the dependencies?
I would very much prefer to continue to be able to do single-step tag/checkout/log operations that would only affect the relevant modules.