Subversion
From Guides
Image:Subversion.png
Subversion
Contents |
Installation
Repository
The repository is where all the files will go. You can hold multiple projects in one repository or create a repository per project.
- To create a repository
svnadmin create <path_to_repository>
- Your projects should contain three subdirectories, it is recommended that you use a project directory in which you place these directories.
- branches - branches of the main project
- tags - tagged versions of the main project
- trunk - main project, you should place your source files here
Example:mkdir myProject mkdir myProject/branches mkdir myProject/tags mkdir myProject/trunk cp --recursive /tmp/myProjectSources/* myProject/trunk/
- Import your project into the repository
SVN import usage:svn import [path_to_projectdir] <url_to_repository/projectdirname> -m "Initial Import"
Example:svn import myProject file:///opt/svn/repository/myProject -m "Initial Import"
Server
After creating the repository you could set up a SVN server. You can then use the svn:// protocol for file transmissions.
svnserve -dr <path_to_repository>
This sets up the svn server to run as a daemon.
You should configure the files in the conf directory that resides in the repository directory.
- svnserve.conf - I uncommented the following lines and set the following values:
anon-access = none auth-access = write password-db = passwd authz-db = authz
- authz - I left this file alone
- passwd - I added some users, just as stated in the examples
