Long ago I married myself to the Microsoft technology stack. For a long long, that meant you were a Visual Source Safe user. VSS's suckiness is well known and well documented. I've been happily using the free license for SourceGear Vault at home for the last 3 years and professionally I've been using whatever my clients had in place (VSS, Vault, or Team Foundation usually). When I came to CSG in late 2006, I was introduced to Subversion (SVN). I'd certainly read about SVN and knew it was a very popular open source source control system. While the adjustment period was a little rocky (mainly getting used to a merge based check-in approach around the team instead of exclusive checkouts).
Like almost everyone that's used it for any significant period of time, I'm a SVN lover. I've been using it at work for 6 months, but knew nothing about setting it up. This weekend I gutted out Vault, and stood up a SVN Server on my home network. For someone used to Microsoft products, you don't like installations filled with editing text files and commandlines. While it's not as polished as a MS install, the whole thing was relatively painless. Because my target host was a windows box, I was a bit worried about dipping my toes into Apache and all that comes with it. Well, let me say - all that *might* come with it. I'm used to IIS based servers and MS does a good job of hiding all of that from me on install. Thankfully, I didn't have to think about Apache once. Below are some posts that detail the installation process if you're interested in going down this path, but at a high level, this is what you need to do.
- Download and run the SVN installer
- Download and run the SVNService installer - handy Windows Service that wraps up SVN nicely in the Windows world.
- Download and run TortoiseSVN install - this is the server client (one of many available)
- If you've never used anything but VSS before, this will be new to you. SVN is a file system based source control system. Each use has a copy of the source on their local file system. The source is freely change locally and at the time you check you, you merge the source into the "trunk"
- SVN has a commandline based interface for performing checkin's, but TortoiseSVN is Windows shell extension that gives you a GUI for performining checkins. It's bound to the windows shell and has icon overlays to notifying you when something's been changed (since the last GET from the server - called an SVN Update).
- Created a default respository in SVN (see links below)
- Configured SVNService
- TIP: By default SVNService tries to configure itself to listen as LOCALHOST. This will cause problem if you plan to access the server remotely from another machine. Make sure to configure SVNService as listening as the machine name hosting the SVN server.
- You'll see posts all over the net complaining about "No connection could be made because the target machine actively refused it" errors. I never found a good reply on any of the sites. Knowing a little bit about Windows Services and Windows TCP/IP, I knew what the problem was. Run the SVNService admin tool and make sure you're not listening as LOCALHOST.
- Setup SVN security
- This is all text file based in the repository directory. Just be patient and read the comments at the top of the config files and you'll figure it out pretty quickly.
- Install all TortoiseSVN on all the client you want to access your server with and checkout the repository using TortoiseSVN's repo browser - svn://your-server/your_repos
- Setup remote access
- I wanted remote access outside of my network. SVN supports HTTP natively, but I've decided to use the SVN native protocol first and if it doesn't prove sufficient for my remote needs, I"ll get HTTP working, but for now, I seem good without HTTP
- I setup routing record on my main router to route all traffic on port 3690 to my SVN server.
- Now I can access my SVN server from TortoiseSVN from my office using svn://svn.kellybrownsberger.com/main/dev_repos. Very cool
Checkout these links for more detail - as usual with open source, get used to a lot of dead links and ugly hacker forum sites.
Setting up a Subversion Server under Windows
Installing SVN