Subversion

From LQWiki
(Redirected from SVN)
Jump to navigation Jump to search

Subversion, aka "svn", is a version control program and is supposed to be the successor to and modern replacement of CVS. The svn client helps you to download ("checkout") files from an svn server. This article describes as well how to set up the client as the server.

The client

Installing

To install subversion, download it from its project homepage, unpack it and compile it. If you want to check out from an https address (svn co https://svn.whatever.com/) you need the neon development package installed at compile-time.

Configuring

If you want to work through a proxy server, you will need to edit .subversion/servers in your home directory. Depending on your network environment you will need some lines like these in the file:

[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
http-proxy-host = proxy
http-proxy-port = 8080
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword

Using

svn is the command to call Subversion.

Example:

svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs

gets you the latest development code of KDE's libraries. It works through svn's default port 3690 and will not function if you are behind a proxy server.

The server

To set up a subversion server, install the client as described above. Then

useradd -m svn
groupadd svn

Find out where subversion expects its repository

/etc/init.d/svnserve start
Starting svnserve svnserve: Root path '/srv/svn/repos' does not exist or is not a directory.
                                                                     failed

Create the respective directory

svnadmin create /srv/svn/repos

Start the subversion server

/etc/init.d/svnserve start

See also

External links