Installing Subversion

11

JUN

09

Installing Subversion

Couple of weeks ago I installed subversion on my development machine on which I have a number of NATed virtual machines that I mainly use for coding and testing.

I wanted to have the repositories on the host machine and commit code from my development mirtual machines. I already had code written on those VMs thus had to import it to the fresh repo.

For the purpose of this walkthrough lets assume a host IP: 123.123.123.123 and one for the VM: 192.168.123.45.

This is what I did:

  1. download from: http://subversion.tigris.org/getting.html#windows
  2. install Subversion in on the host: D:\APPS\Subversion
  3. run Setup-Subversion-1.5.1.en-us.msi
  4. create repository directory: D:\APPS\Subversion\repos
  5. create repository called "admin":
    svnadmin create D:\APPS\Subversion\repos\admin
    
  6. Now lets start the server. There are two possibilities start it as shell or run it as a service
    svnserve.exe --daemon --root D:\APPS\Subversion\repos
    
    or as a service, make sure you have the tool sc.exe in your system32 folder. Google for it if not.
    sc create svn binpath= "D:\APPS\Subversion\bin\svnserve.exe --service -r F:\SubversionData" displayname= "Subversion Server" depend= Tcpip start= auto
    
  7. Set permissions in the cofiguration file of repository "admin" by changing the file: D:\APPS\Subversion\repos\admin\conf\svnserve.conf
    [general]
    anon-access = none
    anon-access = write
    passwd = passwd
    
  8. Create users for repository "admin" by chaning the file: D:\APPS\Subversion\repos\admin\conf\passwd
    [users]
    juergenriemer = hasapassword
    littlepig = letmein
    
    This is mainly to distinguish the author of a change. For more secure authentication RTFantasicM the manual below.
  9. Now lets import the code of the already existing application. Run this on the host (make sure svn.exe is in your environment path):
    svn import \\192.168.123.45\F_DISK\Inetpub\wwwroot\admin svn://localhost:3690/admin -m 'create'
    
  10. on the virtual machine you can now checkout using the following URL
    svn://123.123.123.123/admin
    

Here the link to the manual of Subversion.

Make sure you not only always commit you code but also backup the repository database file on your host

All non command liners should use the well known TortoiseSVN SVN client application.

- said on 2011-02-18 12:33:00

-
is the sum of five and nine.