Subversion

From Guides

Jump to: navigation, search

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.

  1. To create a repository
    svnadmin create <path_to_repository>
  2. Your projects should contain three subdirectories, it is recommended that you use a project directory in which you place these directories.
    1. branches - branches of the main project
    2. tags - tagged versions of the main project
    3. 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/
  3. 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

Links

SVN Book

Personal tools
Google Ads