Fun With Subversion and Trac

In anticipation of our impending move off of Visual Source Safe (finally!) I decided to get my SCM of choice, Subversion, up and running on my Linux box (Fedora Core 4) at home. I’ve used SVN on Windows quite a bit, and have also used an excellent, excellent hosted SVN account at cvsdude.com, but since I may well be the one who winds up administering SVN at work, I thought it was high time to dig a bit deeper.

I also have just started using Trac over at cvsdude.com and decided to install that locally as well. (If you haven’t checked it out yet, Trac is seriously cool stuff, and I’ve barely scratched the surface thus far.) As with all things Linux there’s a bit of manual configuration involved, but in general the process of getting SVN and Trac installed was as simple as typin

yum install trac

in a term window. It downloaded all the necessary dependent packages (including SVN itself) and installed them automatically.

So at this point I have Trac and SVN “installed,” but that doesn’t really mean much. Trac has some great documentation to get you going, however, and the only thing I needed to do in addition to what they outline is chmod on my svn database file and directory in order to let Trac hit it. After that Trac was up and running!

Never one to leave well enough alone, I decided I wanted to tie SVN into Apache using mod_dav_svn. Again this was pretty typical Linux stuff:

yum install mod_dav_svn

to get the files down and then some minor tweaks to the httpd.conf file. I then bounced Apache and was off to the races. There’s some nice documentation about SVN + Apache that will walk you through it.

Next step for me is to get some user access settings in place, but so far not a bad installation process at all. If you’re on Windows and just want SVN, the one-click installer (link above) is definitely the way to go. It gives you everything you need to run SVN through svnserve and even installs svnserve as a Windows service for you. I haven’t attempted a Trac installation on Windows because quite honestly the Linux install seemed a lot simpler, but there are instructions for installing Trac on Windows over at the Trac web site.

I’m sure I’ll have more to say about this as I dig into it further, but as I’ve said before, I just can’t work without good source code control anymore. Even for a relatively small side project I just started on which I’m the only developer, the first thing I did was get an SVN repo going for it. If you haven’t used SCM before or have only used bad SCM like VSS, I strongly recommend giving SVN a shot. Get CFEclipse, the Subclipse plugin (although be wary of versions …), and give this stuff a whirl. It’s a better, safer way to develop and opens up all sorts of flexibility with managing your code that you just can’t get any other way.

For further info, I recommend Version Control with Subversion and Pragmatic Version Control Using Subversion. Both are extremely helpful from a conceptual as well as a technical perspective.

Comments

We’re also going to be moving away from VSS. However, the big stumbling block has been the requirement that we need to preserve all comments from VSS to SVN. I found a python script to do it, but the feedback on it has been mixed at best. How are you approaching that problem, if at all?

Posted by Dave Carabetta @ 4/17/07 3:04 PM

We’re not. 🙂 I’ve been using the Eclipse plugin for VSS for quite a while and it doesn’t let you enter comments anyway (unless I’m just totally missing that option), and we decided that for us it just isn’t worth the hassle. We’ll probably leave our VSS stuff sitting around for quite a while for historical purposes but I seriously doubt we’d ever need to refer back to it.

That’s where we’re at in our development cycle though–we’re at a pretty amazing point of synchronicity in terms of revisions between all our apps so it’s pretty much the ideal time to do it. I suppose if you *have* to retain your comments I’ll wish you luck and be very curious to hear how you fare!

Posted by Matt Woodward @ 4/17/07 3:04 PM

Hey Matt, I’m about to set up a similar system at my new job, it looks like we will also be making the choice for svn simply based on the support of tracs. I have grown used to a super sweet Jira/Confluence/cvs solution thanks to free open source licenses, but it a pretty expensive solution for the new biz. So the question, is tracs available from the standard fedora repos (or extras) or did you get it from elsewhere, maybe atrpms? Being able to yum install / upgrade kind of makes the tracs/svn solution even that much more appealing.

Posted by Chris Scott @ 4/17/07 3:04 PM

we are moving to eclipse and want to abandon vss. there are two versions of subversion — subclipse and subversive. is one better than the other? thanks.

Posted by will @ 8/27/07 5:29 PM

I’ve never used subversive. Subclipse has always worked great for me.

If you’re on a Mac and have been envious of TortoiseSVN on Windows, check this out:

http://lifehacker.com/software/featured-mac-download/integrate-subversion-wit…

Posted by Matt Woodward @ 8/28/07 8:02 AM

For Windows folks, alternative to Subversion with Trac would be

Subversion with BugTracker.NET, free and open source (I’m the author). You include the bug # when you check in and then when you look at the bug, you can see your Subversion revisions, do diffs, etc. More info at http://ifdefined.com/bugtrackernet.html

Posted by Corey Trager @ 11/4/07 6:42 AM

Hi Matt,

I’ve written a walk through guide to installing Trac on Windows without Apache on my own site.

http://how-to-solutions.com/how-to-install-trac-on-windows.html

Your readers might find it of some use.

Posted by How To Solutions @ 10/20/08 11:57 AM

Leave a Reply

Your email address will not be published. Required fields are marked *