Subversion server

Table of Contents

Configuration
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 project.name

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

$ cd project.name/conf
$ 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/project.name -m "Initial structure"

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

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

Checkout the repository

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

Both methods will create local directory project.name.

After updating project files use the following commands:

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

The Subverion book: http://svnbook.red-bean.com/

Comments