Home Page

 

Computers

 

Developer

SVN

A quickstart is available here, as a part of svn book.

Server

To start the SVN server use the following options - inetd, daemon, tunnel (-i, -d, -t). Standalone daemon process:

svnserve -d [--listen-port=] [--listen-host=]

To restrict access to only the given path and below, add the

-r /usr/local/repositories

option to set the repository root to the stated path.

So, start the server with

svnserve -d --listen-port=xxxx -r c:\repository

Client

Install TortoiseSVN client. Select a folder in the Windows Explorer. Run Create Repository Here option. Use Repository Browser or SVN Checkout to browse SVN repositories and/or retrieve files from them.

TortoiseSVN can be used to quickly create a SVN repository.

 

After installation, SVN allows anonymous browsing in the repository but no write access to anonymous users. It can be allowed but it is recommended to set up users.

Edit the conf/svnserve.conf file in the repository.
To enable anonymous write access use

[general]
anon-access = write

or set up users through a password database. Setting in svnserve.conf is

[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authzfile

This disables anonymous access and allows only authorized access to a repository.

The password file can be referenced using an absolute or a relative path. The path must be in *nix format /folder.

The password file is in format

[users]
username = password
...

Authorization file is self-explanatory.


So, here is a step by step short tutorial.

Installation:

Install TortoiseSVN client and unzip SVN server.

Creation of a repository:

Create an empty folder, for example c:\temp\a. Use TortoiseSVN to create a repository in that directory. Edit conf/svnserve.conf and add the lines

[general]
anon-access = none
auth-access = write
password-db = passwd

Then edit the passwd file and add

[users]
username = password
...

Server startup:

Run the SVN server.

svnserve -d -r c:\temp\a

Use TortoiseSVN to connect to the repository. svn://localhost