Subversion Repository Structure
Since I have recently discovered a new useful subversion feature named svn:externals, I have used it to create the new KMKey 3 repository. The feature consist in to assign a property to a svn directory that is used to fetch modules from other paths in the repository, or even from other subversion repositories. Its use is very simple, given a directory already added to svn, just execute the following:
svn propset svn:externals -F EXTERNALS.txt
svn commit -m “Your message” --username=youruser
Where EXTERNALS.txt is a text file containing lines that this ones:
KMKeyWidgets https://svn.sourceforge.net/svnroot/kmkey/products/KMKeyWidgets/trunk
AdvancedQuery https://svn.sourceforge.net/svnroot/kmkey/vendors/AdvancedQuery/tags/2.1
CPSBlog https://svn.nuxeo.org/pub/CPS3/products/CPSBlog/trunk
This is very useful for some reasons:
-
It permits create bundles, virtual directories where the end users can, using just svn, download your code and all its dependencies
-
It allows to have the typical structure of trunk, tags and branches for each module, instead for the whole application
-
For dependency products not available in svn, you can create a vendors directory where to put its code in your own repository
-
You can create a bundle for the head of your development, and another one for each release, including the correct version of dependency products in it.
For instance, that's the current repository structure of KMKey:
./vendors
./vendors/AdvancedQuery
./vendors/AdvancedQuery/tags
./vendors/IncrementalSearch2
./vendors/IncrementalSearch2/tags
./vendors/OFolder
./vendors/OFolder/tags
./vendors/ManagableIndex
./vendors/ManagableIndex/tags
./products
./products/ZOORRA
./products/ZOORRA/tags
./products/ZOORRA/trunk
./products/ZOORRA/branches
./products/KMKeyResources
./products/KMKeyResources/tags
./products/KMKeyResources/trunk
./products/KMKeyResources/branches
./products/KMKeyWidgets
./products/KMKeyWidgets/tags
./products/KMKeyWidgets/trunk
./products/KMKeyWidgets/branches
./products/KMKeyCore
./products/KMKeyCore/tags
./products/KMKeyCore/trunk
./products/KMKeyCore/branches
./bundles
./bundles/kmkey-3-head
So, you can obtain all you need to start to work with a simple:
svn co https://svn.sourceforge.net/svnroot/kmkey/bundles/kmkey-3-head/