Subversion

Subversion is a replacement for CVS based on current technologies such as HTTP and WebDAV.

The website on tapioca is managed using subversion. All pages for the tapioca website are checked in a subversion repository at http://sw.deri.org/svn/. The repository is hourly checked out per cron job into /var/www, where the web site resides. That's why, if you make changes to global pages (i.e. pages that you don't "own" in your own home folder), these changes will take some time to come into effect.

More and detailed information about subversion can be found in the book by O'Reilly, which can downloaded here (legally).

Features

Overview

User

Import a directory

svn import directory/ http://sw.deri.org/svn -m "your comment"
Note that directory/ should contain the YYYY/MM/proj subfolders (i.e. 2004/03/subversion). Please provide a comment with every change.

Check out a directory

svn checkout http://sw.deri.org/svn
Create a local copy of the web site.

Check changes

svn status
Check changes between repository and local copy.

Update

svn update
Updates local copy from repository.

Commit

svn commit -m "some comment"
Commit changes in local copy to the repository. You always have to supply a comment!

Set ID

svn propset svn:keywords Id filename
Automatically change Id in filename with every update.

Delete something from the repository

svn (delete|rm|remove) filename
Remove file with filename from the repository. Directories are only visibly removed after you commit the changes!

How to recover your stuff after a complete crash

After the recent crash of the subversion system, our glorious admin tried to recover everything with the tools provided by subversion. Unfortunately, due to low-level problems, it didn't work completely. So here is what I did to recover my own stuff:

OK, I hope that helps and makes sense...

Root

Create Repository

# svnadmin create /var/lib/svn/repository
Create repository. chown -R www-data.www-data repository, change /etc/apache2/dav_svn.conf and add the repository to the site structure.

Add a User

# htpasswd -m /etc/apache2/auth-file username
Create user for use in Apache2's httpd (subversion and other http-based access control).

Add a User to a Group

# vi /etc/apache2/group-file
Add a user to a group. Currently, only users belonging to group "deri" can update the subversion directory.

Access Control

To restrict access to certain users or groups, change /etc/apache2/sites-enabled/svn and add along the lines of

<Location "/2006/04/swseminar">
        Require group deri
</Location>


Andreas Harth
$Id: index.html 3637 2006-06-16 17:04:36Z aharth $