Turn Left - A weblog by InetSolution

A Few Unconventional Uses for Subversion

By Jason Sherrill
Posted on Aug 7, 2007

Comments (0)

Last week, I told you how to setup a Subversion server on Windows to help manage your software source code. Subversion makes it easy to go back in time to see what has changed in your code between versions; you can even roll back to a previous version with a few simple clicks. But software source code isn't the only data that Subversion can help you manage; here are a few ways that everyday people (i.e., non-programmer types) can Subversion to make computing safer and easier.

First it's important to know that you don't need a server to run Subversion. You can install Subversion on your personal computer and then setup a repository on a USB drive or even another folder on your hard drive. Since Subversion will run on Unix, Windows and Mac OS, virtually anyone can put Subversion to use.

Track Website Content Changes

Yeah, you're right, this isn't an unconventional use, but it is still a good use of Subversion. If your website is static HTML and you do not use a database-driven content management system (CMS), then Subversion is the perfect tool to maintain a history of your website's changes. Each time you edit a page, simply commit your change to Subversion and you'll have a complete history of every content change that you make to your website. This is especially useful if you're tracking your search rankings or visitor conversions and you want to learn how content changes effect your rankings or conversions.

Maintaining My Documents History

I create or edit between five and twenty new documents on an average day. These are usually Word, Excel and similar standard documents. Often I'm using an existing document as a template and then after editing, I save the document with a new name. Occasionally I goof and click "Save" instead of "Save as" and overwrite the document that I used as a template. Ugh!

An easy solution is to setup a Subversion repository to store the contents of your My Documents folder. Once configured, your My Documents folder becomes a local working copy of the repository. You can then setup a scheduled task on Windows (or a cron job on Unix) that runs every hour to commit any changed documents to your repository. Now if you need to restore any documents to their previous state, you can easily revert to any previous version.

Easily Tracking System Configuration Changes

This is more applicable to a Unix environment, but there are some instances where it works on Windows too. Often when installing Unix applications, like Apache, I make many small modifications to text-based configuration files like Apache's httpd.conf file. In some instances, I make hundreds of changes to the configuration files. All of these changes result in two problems:

1) I sometimes make so many changes in the course of a few minutes, that I forget about some of them. If I then have a problem starting the application, it can be difficult to remember which change I made that may have created the problem.

2) Once I get everything working, I may not need to perform that same setup again for months or even years. If I had to tweak the application extensively to configure it to my liking, it would be nearly impossible to duplicate without a very precise history of the steps I performed.

When I setup applications like Apache, the first thing I now do after installing the base application is to create a Subversion repository. I then import my entire application folder into the new repository. For example, with Apache I'd import c:\apache22 into my Subversion repository. Now as I make configuration changes, I commit each change that I make (it only takes two clicks and a couple of seconds). Now I have an easy-to-access history of all of the changes I made to configure the application. If I need to roll back a change, it only takes a second. If a year later I need to setup the same application on a new system, I can easily view the steps I took to do it the first time.

Where to Go Next

Google, of course, but I'll recommend these articles to get started:

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Who is InetSolution?

Jason - Project Director
Justin - Lead Architect & ASP.Net Developer
Donovan - Creative Director
Mac - ASP.Net Programmer
Larry - ASP Programmer/Requirements Guru
Mosh - ASP.Net Programmer
Paul - Software Architect & DBA
Jay - Weekend & Holidays Sys Admin
Karen - Business Development & Client Care

Our Services

Web Design/Development
We practice a user-centered development philosophy. We work with clients who place their customer's needs first. We need to know who will use your site and why.
Secure File Exchange
Turn your website into a state-of-the-art file exchange system, requiring only a web browser, username and a password.
eCommerce Web Development
We have experience, know-how and superior customer support to ensure that your store is profitable and that your investment with InetSolution earns a high return.
Disaster Recovery Hosting
We provide fully-managed SQL server database hosting for companies seeking a warm disaster recovery site.
About InetSolution

We make business websites profitable. We do it with usable design, solid programming and unique, methodical marketing.