Subversion

Subversion Server and Clients

Configuring Subversion Service and Outside Access

  • In your directory c:/Data/repository (or anywhere else, where TortoiseSVN had created your repository), find subdirectory conf.
  • Edit file svnserve.conf and also passwd file in the conf subdirectory of your repository. Add the following lines:
passwd
=============
[users]
# harry = harryssecret
# sally = sallyssecret
yourname = yourpassword
instructor = instructorsecret
svnserve.conf
=============
[general]
# anon-access = read
# anon-access = write
# auth-access = write
# password-db = passwd
# realm = My First Repository

password-db = passwd
realm = Repository for this and that
anon-access = none
auth-access = write

You may replace "yourname" with your real name or nick, and choose some reasonably secure password. For user "coach" leave the password as "instructorsecret". (The instructor will not update files in your repository without your previous knowledge. Besides, if something goes wrong, we can revert your code to a previous revision - for this you need to backup your repository regularly.) If later you work in teams, you would need to add your teammate names and passwords to the file passwd as well. See http://svnbook.red-bean.com/en/1.0/ch06.html for more information.

Make Subversion a Windows service

  • Go to http://dark.clansoft.dk/~mbn/svnservice/ and download service wrapper - SVNService.zip. It includes the Visual C++ source, but we need only SVNservice.exe file. Place it into your Subversion bin/ directory. For example, under c:\Program Files\Subversion\bin.
  • Run (to register Subversion as the windows service):
svnservice -install --daemon --root=c:\data\repository

Connect to the server

  • Make sure that Svnserve is running; check the password-protected access to your repository:
    1. Right click in some Windows Explorer window, open TortoiseSVN->Repo-Browser
    2. Write the following URL to the window: svn://localhost
    3. Select your username and password (e.g. "yourname" and "yourSecret"). Check the box that offers to remember that password, so you do not have to enter it again.
      1. See that the Repository browser opens
    • Please do not use the file-path URL (something like file:///c:/Data/Repository), but rather use the subversion server URL (svn://localhost) to access your repository.
    • If your computer is protected with a firewall, you can configure it to allow outside access. For the Black-ice firewall the actions are like this:
      1. Right-click the Black-ice (i.e. the Blue-Eye icon in the lower-right corner of the screen), and pick "Advanced Firewall Settings".
      2. Fill in these values:
    Name: SVNServer
    IP Address: All addresses
    Type: TCP
    Port: 3690
    Direction: Inbound
    Mode: Accept
    Duration: Forever
    
    1. Click "Add" and "Close"
    • Find out your machine's IP address in a DOS window - type the command "ipconfig" and find out the IP address, which could be something like Number1.Number2.Number3.Number4
    • Send your name and your machines IP address to the instructor's e-mail.

Alternatives to Subversion Server Installation

  • If you are more used to CVS, the instructions are very similar, but are not covered in this installation guide. Subversion is considered to be an upgraded CVS tool.
  • It is also possible to use an Internet based CVS and Subversion hosting service CVSdude (see https://secure.cvsdude.org/ ). One has to register and use a limited repository free of charge.