Questions about Subversion (and some answers)
A friend pinged me on IM today with some questions about Subversion and instead of just answering him directly, I thought it might be helpful to answer him here, and solicit feedback from others.
1. How easy is it to set up? Is any additional software needed? (E.g. Apache)
Subversion is very easy to set up. The Tigris.org site for Subversion has Windows binaries available for download. I’m only speaking about Windows setup as I’ve not done it anywhere else. You run the installer, and choose the SVN daemon mode, where it runs as it’s own Windows service and on its own port (3690). I think this is the easiest way to install it.
You can however, install it with Apache support. Doing it this way will route traffic over port 80, and uses an Apache module to handle SVN traffic over the web server. I have no experience with this.
2. Must you “check in” a file in order to test it, or can you test it before you “check in/merge” a file?
There are a couple things going on here. I’ll try my best. First off, the developers I work with always develop locally. That means that you’re testing while you’re developing. But we also use CruiseControl which is a Continuous Integration utility, hooked up to CFCUnit. That way, when you “check in” (called a Commit in SVN) any files, a suite of unit tests is run by CruiseControl. That way, we have automatic testing of the entire application any time anyone commits a change to the repository.
The second thing that needs mention is that SVN is a source code database. It isn’t the source code itself. You can have the SVN daemon running on your staging server, but you don’t have to. And just having it running on your staging server doesn’t mean that code you commit to the repository will get onto the staging server’s webroot. The way you push changes to the repo to other servers (for testing) is either using CruiseControl (which involves a lot of setup and uses ANT) or a post-commit hook. Example post-commit hooks are available in the default SVN installation and include commands to copy the changes (the commits) from the repository to another server. This way, you can have a central staging server that is an up-to-the-minute copy of the code in the repo.
3. Have you used it with the Eclipse client? Does it work nice with CFEclipse?
I have only briefly used it with the Eclipse client, called Subclipse. It worked okay, but for Windows, I always found myself using TortoiseSVN (which is absolutely fantastic). Now I’m on a Mac, so I’m using SCPlugin, which is similar to TortoiseSVN (it bolts onto the Finder) as well as Versions, a new Mac SVN client. I don’t use Eclipse any more myself.
Subclipse and CFEclipse work great together due to Eclipse’s plug-in architecture.
Does anyone have anything to add?

The great thing about Subclipse is that you can view a repository and then checkout the trunk right into an existing project or create a new project based on it. It is just another little tool that makes my day easier!
Comment by Dan Vega — July 3, 2008 @ 12:00 am
Nice of you to share that, Nat. You never know who might benefit from it, and it’s a shame that so many great discussions happen only one on one in email.
That said, since you ask for "anything else to add", I’ll point out that I did a similar sort of brain dump of things I’d found to answer such common questions, in creating my:
Getting into Subversion as a CFML developer: Another Resource List
http://carehart.org/blog/client/index.cfm/2006/7/12/subversion_resources
Hope that may help someone, too. Keep up the good work (and yes, I know I still owe you guys some photos and videos from the fun and games at CFUnited! It was a blast to hang out with you guys, and good to see you again.)
Comment by Charlie Arehart — July 3, 2008 @ 12:00 am
Best resource for Subversion help is the "Help" available in Tortoise SVN. I usually recommend all new SVN users install Tortoise and then spend 30 minutes or so going through "Basic Concepts" and "Daily Use Guide". Very well written guide on SVN.
Comment by Jim Priest — July 3, 2008 @ 12:00 am