Topic: tech myref prev next
tech myref > Subversion
setting up a Subversion repository for testing
Subversion supports ‘sparse checkouts’, which will check out just the top level of a repository’s directory hierarchy;
svn co svn://my-repository/ . --depth immediates
To get the full contents of a specific directory with this checkout;
cd cad
svn update --set-depth infinity
Notes on setting up a simple Subversion repository using svnserve
.
Create a separate user account for the Subversion process;
/sbin/useradd -r svn
mkdir /srv/svn
#chown svn /srv/svn
svnadmin create repo --fs-type fsfs
chown -R svn repo
Allow anonymous reads and writes, for testing;
cat /srv/svn/repo/conf/svnserve.conf
[general]
anon-access = write
auth-access = write
Create a Systemd service;
cat /etc/systemd/system/svnserve.service
[Unit]
Description=Subversion protocol daemon
After=syslog.target network.target
[Service]
Type=forking
RuntimeDirectory=svnserve
PIDFile=/run/svnserve/svnserve.pid
EnvironmentFile=/etc/default/svnserve
ExecStart=/usr/bin/svnserve $DAEMON_ARGS
User=svn
Group=svn
KillMode=control-group
Restart=on-failure
[Install]
WantedBy=multi-user.target
Create a directory for Subversion to store its logs;
mkdir /var/log/subversion
chown svn /var/log/subversion
Provide a configuration file with arguments to the svnserve
process;
cat /etc/default/svnserve
DAEMON_ARGS="--daemon --pid-file /run/svnserve/svnserve.pid --root /srv/svn/repo --log-file /var/log/svnserve/svnserve.log"