Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

It is suggested that project committers take the following approach when organizing their Subversion repositories. These guidelines exist due to the manner in which tagging and branching occur in Subversion. Even if you do not use those features at the moment, it doesn't hurt to prepare your repository in this manner. The general recommendation is to create a top-level directory for every sub-project within your repository. Within each of those directories, include a trunk, tags, and branches directories.

Lets assume a new repository called FOO has been newly created by a Codehaus administrator on your behalf. Within this new repository, you want to create two projects called project1 and project2. Following the above guidelines would result in this directory structure:

No Format
|-- project1/
|   |-- branches/
|   |-- tags/
|   `-- trunk/
`-- project2/
    |-- branches/
    |-- tags/
    `-- trunk/ 

The following command can be used to setup a newly created repository in this manner:

No Format
svn mkdir \
     file:///home/projects/FOO/scm/project1 \
     file:///home/projects/FOO/scm/project1/trunk \
     file:///home/projects/FOO/scm/project1/tags \
     file:///home/projects/FOO/scm/project1/branches \
     file:///home/projects/FOO/scm/project2 \
     file:///home/projects/FOO/scm/project2/trunk \
     file:///home/projects/FOO/scm/project2/tags \

It should be noted that the above command must be run locally on the Codehaus server. You can just as easily run it remotely by changing the repository URL. For example:

No Format
svn mkdir \
     svn+ssh:// \
     svn+ssh:// \
     svn+ssh:// \
     svn+ssh:// \
     svn+ssh:// \
     svn+ssh:// \
     svn+ssh:// \