Ken Kopczyk

Hurdles in .NET Development

Installing SVN on Windows is Easy!

Posted by Ken on December 21, 2010

I shouldn’t have to go into the importance of a good source control system. It allows you to do the following great things:

  • track code changes over time
  • rebuild old versions for technical support purposes
  • discover the original author of the software so you can playfully fingerpoint when it breaks
  • document features and bug fixes in a particular release
  • it’s a giant “undo” button!  (as described in The Pragmatic Programmer)

Installing an SVN server as a windows service is painless:

  1. Download and install the CollabNet SVN server and command-line client package on your server.
    • At the time of writing this, the latest stable version was 1.6.15.
    • Since we are installing this to run as a Windows Service, you can uncheck Apache in the “Choose Components” step. (Figure 1)
    • By default, SVN uses port 3690 and a default repository path of c:\svn_repository. (Figure 2)
  2. To set up a repository, run the following command:  
    svnadmin create "c:\svn_repository"
  3. Uncomment the following lines from c:\svn_repository\conf\svnserve.conf
    anon-access = read
    auth-access = write
    password-db = passwd
    
  4. Add users to c:\svn_repository\conf\passwd
    [users]
    # harry = harryssecret
    # sally = sallyssecret
    user = password
    
  5. Make sure port 3690 is open on your server if you have a firewall.
  6. Start the “CollabNet Subversion svnserve” windows service and you’re server is good to go!

Next, we need to install some client components that can access the server:

  1. Download and install TortoiseSVN on your client machine.
    • Allows you to access the SVN server and integrates into the windows shell.
    • At the time of writing, the latest version is 1.6.12, which is designed to work with SVN server 1.6.15
    • All default options are fine.
    • Requires restart.
  2. Download and install WinMerge on your client machine.
    • Default options are fine, but ensure that “Integrate with TortoiseSVN” is checked. (Figure 3)
    • The TortoiseSVN integration allows WinMerge to handle diff’ing of code history.

Figure 1

Figure 2

Figure 3

Leave a comment