3. Modules

In CVS there is a facility to group a number of directories into a module that can be checked out in one go. A similar effect can be achieved in subversion using the svn:externals property.

Here follow instructions for creating a module myModule that will check out directories A, B and C. Directory A will be checked out into ./root. Directory B will be checked out into ./root/sub. Directory C will be checked out into ./tools.

  1. First create a module directory in the repository and check it out:

      $ svn mkdir file:///home/joe/svn/rep1/modules/myModule
      $ svn co file:///home/joe/svn/rep1/modules/myModule latest_myModule
      $ cd latest_myModule

  2. Then edit the svn:externals property for this directory:

      $ svn propedit svn:externals .
    Enter the following lines:
      root          file:///home/joe/svn/rep1/A/trunk
      root/subdir   file:///home/joe/svn/rep1/B/trunk
      tools         file:///home/joe/svn/rep1/C/trunk

  3. Check the result by updating.

      $ svn update
    Your directory should now populate.

  4. Check in the new property value.

      $ svn commit