Monday, November 14, 2011

svnserve init / startup script for ubuntu

One needs to create a script in /etc/init.d to ensure that svnserve is started at boot time.


A script with start, stop and restart (and optionally status) can be created, but a simple script which just starts the server will suffice.

#! /bin/sh
#
# svnserve
#
# start svn server
#

COMMAND="$1"
shift

case $COMMAND in
start)
svnserve -d -r /home/jws/svnserver/repository
;;
stop)
killall svnserve
;;
esac


the script can be installed into the init.d with the following:

update-rc.d svnserve defaults

Multiple repositories on same server:
http://wordaligned.org/articles/one-svnserve-multiple-repositories

make a directory called "repositories"
place all repositories in that directory.


start svnserv with that directory, rather than a pointer to a single repository.


Each repository is independent, with a separate url.


eg:
repositories
    local
    globalmt


svn://host/local is one base repo.
svn://host/globalmt is the other base repo

migrate cvs to svn:
http://cvs2svn.tigris.org/


cvs2svn can be installed on Ubuntu with apt-get


with a directly addressable copy of the cvs repository data, one can run the cvs2svn and produce an svn repository file structure with the migrated data.


cvs2svn -s <svn repo name> /cvs/cvsroot/modulename

No comments:

Post a Comment