Run Geek

Mind of Bernie

Subversion Revisited Again. Kind Of…


It took me about two days to write a post on How To Setup Subversion (SVN) With A Virtual Appliance.

So I’m not going to try and convince you to use Source Control. Instead I’m going to show you how easy it is to set one up, you have no excuses not to use it.

But guess who came along and wrote his own post on Subversion. (Setting up Subversion on Windows) Its pretty weird that we were both thinking about version control. Jeff talks about setting up SVN in the Windows OS using the default installer from Subversion. Its is good idea to learn how to setup Subversion once, and its worth a read if you have never done it. After that I would still recommend running SVN in a VM. Its easier to move around and back up since its all running in a file. His post does has some good points though.

I’ve met precious few developers that really understood the versioning concepts in the simple centralized source control model. I have only the vaguest of hopes that these developers will be able to wrap their brains around the vastly more complicated and powerful model of distributed source control.

Also the big blogs are battling it out about issue of using SVN or distributed source control. Even Linus Torvalds (creator of Linux) has chimed in about how much he hates SVN and runs GIT.

Czajnik responding to Jeff Atwood’s howto on setting up Subversion on windows: “Have you tried any distributed source control? I’ve recently switched from Subversion to Mercurial, and I’m very happy about the change. The most important reason was the ability to clone the repository to my laptop, do some checkins there (without network access, on a plain, train, etc.) and resync with just one command when I’m back home. Distributed model seems cool even for a single developer :)”

Jeff does respond back in his comments and also talk about GIT from Linus’ talk.

I watched the rest of Linus’ talk at http://www.youtube.com/watch?v=4XpnKHJAok8 . Git *enforces* per-developer personality-driven p2p branches. This is great for ego-driven people like Linus who have a lot of power, fame, and personality. That makes sense. :)

I’m really intrigued by Linus’ claim that merging becomes extraordinarily simple in Git. He’s absolutely right about that– the problem with branches isn’t the branching, it’s the merging.

Wow… It feels cool that I’m thinking about the same stuff that these guys are thinking of… just maybe not on the same level =) However, I want my readers to get some main ideas from my post on version control.

  1. Version Control is good and you should use it
  2. VA’s are great for version control deployment. Easy to setup, runs on different OS’s. Network accessible. Easy to back up.

Yes, you should learn Subversion or another Version Control package. And if you want a custom VA, creating your own with an Ubuntu Image is very easy and clonable. I have create my own VA with Ubuntu and Tomcat running Axis. It has a shared SMB drive and from Windows I drop my WAR package and deploy web services. If anyone is interested in a copy of my Web Service VA let me know. (*HINT* post a comment, I can see your e-mail address but not the rest of the world) Hmm… maybe my next blog will be about how I created it.


How To Setup SVN And Trac With A Virtual Appliance


Source Control is a important tool for EVERY Software Developer. Jeff at CodingHorror puts it best.

Source control is the very bedrock of software development. Without some sort of version control system in place, you can’t reasonably call yourself a software engineer.

Its even part of Joel Test: 12 Steps to Better Code.
So I’m not going to try and convince you to use Source Control. Instead I’m going to show you how easy it is to set one up, you have no excuses not to use it. I previously talked about VMware Player and Virtual Appliances (VA), and were going to build off that. The repository of choice is SubVersion (SVN).

Step 0: Make sure you have the free VMware Player installed or another Virtualization software. (Parallels, Xen Open Source, etc..)

Step 1: Head over to JumpBox and download Trac/Subversion appliance. Its a 115MB download, but its the complete package. This Virtual Appliance does not only have source contorl, but also provides a Ticket Tracking System and a Wiki for your documentation.

It looks like JumpBox is starting to setup a Subscription Fee to download their VA’s. I was still able to download the Free Version. If your not able to download it, leave a comment and I will post a mirror.

Step 2: After you download the zip file. Extract it to your hard drive. This is your virtual computer. (If you want to backup your system, just burn a copy onto a CD/DVD disc, AWESOME!)

Step 3: Open VMware Player and navigate to the folder where you extracted the files. Select “JumpBox.vmx“. And your system will boot. It will use DHCP to aquire an IP address. You will manage your repository through a website.

After your VM boots you should get a screen like this.

First Boot

Step 4: Open a web browser and type in the “Management Page” url in the address bar.
(In this case its https://192.168.1.110:3000/)

Inital Setup

These are pretty simple configuration options. Just make sure to remember your password!

Step 5: Visit the application page! (In this case its http://192.168.1.110 and you don’t need the ’s’ in http)

Trac Wiki

On the Wiki you can see the location of the SVN repository. I would suggestion creating a new Account with a better name then Admin. So when you check-in files the repository has your name and not Admin as the author.

To Add Users you will first need to login by clicking the red login link on the top right hand side of this page. You will login in as the user admin and the password you used when configuring your JumpBox. Once you are logged in as the administrator new users can be added by clicking on the Trac Admin link (it will appear on the top right once you log in) then the Users link. These users will have access to both Trac and the Subversion repository. Many other settings can be changed through the Trac Admin link.

A popular SVN client is TortoiseSVN. Its a shell extension to windows. This means you get new menus when you right click.

It is implemented as a Windows shell extension, which makes it integrate seamlessly into the Windows explorer. Since it’s not an integration for a specific IDE you can use it with whatever development tools you like.
Another advantage of this shell integration is that not only web or software developers can use it but all the people who don’t have the development tools installed, for example translators, doc writers, …

I program with Eclipse so I also use a plug-in called Subclipse.

Subclipse is an Eclipse Team Provider plug-in providing support for Subversion within the Eclipse IDE.

That should be enough to get you setup with your very own software repository. Congratulations, you can reasonably call yourself a software engineer! However, there is still much to learn about version control.

Link-a-tron: Post is getting long, so I’ll put some quick links.

Subversion Homepage
Secure SVN Repository using svn+ssh
Google’s Free Online Open Source Repository (Great for sharing, but must select Open Source License to release under)
SourceForge (Another free hosting to Open Source projects)