Adobe Solution Partner

November 28, 2007

Version control on the cheap with Subversion & Trac

Filed under: General Development — Tags: , — Shannon Hicks @ 8:19 am

I used to hate version control. Visual Source Safe was slow, obnoxious, and all but unusable over a VPN. CVS was a pain to set up, and I wasn’t fond of the command line or GUI tools available at the time. Subversion seemed like a step in the right direction, but again as someone relatively new to the Unix/Linux world, it seemed to be a tad over my head.

I tried setting up a subversion server a couple times, and even succeeded on my Mac Mini, but getting a daemon to start on boot on the Mac is not a simple task, and eventually I stopped using it because I was too lazy.

Eventually, I came across DreamHost. While their shared hosting is probably not a good choice for a medium-to-high traffic website, it turned out to be perfect for me to use as off-site backup and Subversion repositories. With generous bandwidth and storage policies, it was perfect.

After you sign up for an account, they have the typical shared hosting control panel. If you click on Goodies, you are able to create as many Subversion repositories as your heart desires.

Once you’ve created your repositories, you’re going to want to install TortoiseSVN. It’s the perfect Windows client, and has integration with Flex Builder/Eclipse (Free) and Dreamweaver (the better plugins are Commercial).

Trac is a very simple project management tool that has integration with SVN. Set up your milestones, add tickets, and it does the rest. You’re able to make everything public or private, including browsing the source code right from the site.

Now, the true power of version control lies in a few key areas:

First off, it’s a great backup tool, in a sense. You get to keep a copy every revision of every file in your project. And, it’s easy to compare any previous version to any other version of the file.

Secondly, it’s critical if your project tends to have versions. If you follow the best practices for version control, you can have branches (and tags) of your code for each version of your project, which are easy to switch between with just one click. This way, you’re able to maintain the current release while also working on a future version. Yes, occasionally you’ll have to make the same code changes twice, but with the version compare tools built-in, it’s pretty easy. If you want to learn more about best practices, I recommend this free article/book from openCOLLABNET.

Also, it allows for team projects. Even when you try to avoid it, multiple people will end up editing the same file. Try as you might, it will happen. SVN allows for this, and alerts you when there’s a conflict. It has built in tools to handle this, but you’ll probably want to manually double-check what needs to be done.

Hopefully, with as easy as it’s become, you will embrace version control as I have.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Technorati
  • TwitThis

6 Comments »

  1. Does Dreamhost come with Trac installed? Because I remember reading some HOWTOs and it did not seem like an easy piece of software to install.

    I eventually settled on a JumpBox (www.jumpbox.com) which is a VMWare image with SVN and Trac already installed, configured, and integrated.

    Comment by Dan L — November 28, 2007 @ 12:00 am

  2. There is a good open source subversion extension for dreamweaver available here: http://sourceforge.net/projects/subweaver/.

    Comment by Matt — November 28, 2007 @ 12:00 am

  3. Trac is OK for a free solution, if you want to really leverage this kind of solution, check out JIRA @ http://www.atlassian.com/software/jira/ commercial open source … very slick and easy to use, $1200 USD

    Comment by zac spitzer — November 28, 2007 @ 12:00 am

  4. I’ll second jumpbox. I’ve tried to install trac before and boy was it a pain. So much so that I couldn’t get it to work. When I have to do it all again, I’ll definitely be using jumpbox.

    Comment by tony petruzzi — November 28, 2007 @ 12:00 am

  5. Dreamhost doesn’t have a one-click install yet, but this shell script is what I used:

    http://wiki.dreamhost.com/DreamTracInstall

    Comment by Shannon Hicks — November 30, 2007 @ 12:00 am

  6. Another issue tracker, free and open source, that has good Subversion integration is BugTracker.NET, at http://ifdefined.com/bugtrackernet.html.

    Screenshots here on how BugTracker.NET, Subversion, and TortoiseSVN integrate:
    http://www.ifdefined.com/doc_bug_tracker_subversion.html

    Comment by Corey Trager — December 8, 2007 @ 12:00 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

 

Server Down?

Maximize Web application uptime by drawing upon Webapper's years of experience tuning and stabilizing many of the world's largest ColdFusion Web applications. Contact us today!