After you’ve been working with code for a while, source control is a godsend. It provides a way of tracking changes, prevents conflicts and generally saves your bacon. Here’s how to set it up on Windows 7.
Setting up the SVN service
A lot of people tend to run into problems with this one and assume that TortoiseSVN is somehow incompatible with the version of the SVN binaries from the SlikSVN package. As always, it’s all in the setup. If the svnserve service isn’t set up correctly, you may encounter the following error when you try to browse your repository using TortoiseSVN:
Can't connect to host localhost: No connection could be made because the target machine actively refused it.
This is because unless explicitly stated, svnserve will listen for IPv6 connections where the IPv6 protocol is supported, which is true of Windows Vista, 7 and Server 2008. In order to get TortoiseSVN connecting properly, you need to set up the svnserve service as follows (from an Admin command prompt, assuming your binaries are installed at
sc create svnserve binpath= "C:\Program Files\SlikSvn\bin\svnserve.exe --service --root C:\Users\Chris\SVN --listen-host 0.0.0.0" displayname= "Subversion" depend= tcpip start= auto
The important bit being the
--listen-host 0.0.0.0, which tells svnserve to listen for IPv4 connections. Now start your service:
net start svnserve
And when you open up
svn://localhost in your repo-browser everything should be working perfectly.