Subversion server

Table of Contents

Create/restore a repository
Add $Id$ tag to your project files

Create/restore a repository

by ross at 17:25:20 on March 20, 2014

Prepare the new project's repository

# su -l svn
$ cd repos
$ svnadmin create

$ cd
$ touch rep-cache.db
$ chmod ug+w rep-cache.db

$ cd
$ chmod 600 passwd

Edit passwd:

login1 = password1
login2 = password2

Edit svnserve.conf:

anon-access = none
auth-access = write
password-db = passwd

Restore repository

Now when the repository has been created you can import the data (a dump file created with svnadmin dump command):

# cd /home/svn/repos
# svnadmin load reponame < /path/to/reponame.svn

chmod/chown the reponame directory.

New repository: Initialize structure

If this is new repository create the traditional structure:

As a user from project's passwd:
$ cd
$ mkdir tmp
$ cd tmp
$ mkdir branches tags trunk
$ svn import . svn://coffin.lan/ -m "Initial structure"

Repository is ready to be used. Import the initial program files:

$ cd /home/user/Projects/
$ svn import . svn://coffin.lan/ -m "Initial import"

Checkout the repository

$ svn co svn://coffin.lan/
Or (if you are in svn group):
$ svn co svn+ssh://coffin.lan/home/svn/repos/

Both methods will create local directory

After updating project files use the following commands:

$ svn up
$ svn commit -m "Comment line of the commit"

The Subverion book: