[xplorer˛] — File safety part I: Version control
home » blog » 19 January 2007
play flash demo


"Only a fool places all his eggs in one basket" — Unknown Greek wiseguy

This is the first article in my "blog". I intend to write every now and then about windows shell, all things files, how to make the most of xplorer˛ and other generic rantings as necessary. It is unlikely there will be any regularity in terms of time so if you want to get notified of new posts make sure you subscribe to the RSS feed.

The other day I was reading about this Backup Revision Folder tool, developed for the kind of guy that is overly anxious about backups and wants to save automatically every now and then. A bit over the top for my liking but it was the inspiration for this first article.

As a software developer one understands the need to keep older versions of the source code. I am not talking about mere backup but keeping snapshots of the files as they evolve over time. In this way, if you have a stable version, and then you modify something silly and things start crashing, you will be able to go back to the original safe source, or at least you will be able to compare the changes so as to figure out where things took the wrong turn.

For many years I maintained xplorer˛ source code using a really neat tool called Keep-It. It was the perfect kit for lightweight one-man-show projects, easy to setup and use. You had to create a new KAR file, drag-drop on it individual files or whole folders, and periodically take snapshots with the context menu. All previous versions were accessible through an explorer NSE, imagine something like a zip file with subfolders for each snapshot. Note the past tense used in all previous statements: Keep-It is no longer developed and sadly I doesn't run properly on XP SP2 so... RIP!

Keep-It's demise left a big hole in my workflow. I searched for a similar substitute to no avail. There are big beasts out there like CVS, Subversion etc which are meant for large collaborative projects but it seemed overkill for a single person. But in the end I had to bite the bullet in the shape of TortoiseSVN. This oddly named tool is a front end for subversion, an open source revision control system. It isn't too hard to setup at least for a single person working on one computer (no client/server requirements). You don't even need to install Subversion separately, the wise tortoise carries it on its back already.

Then you try to create a repository and it hits you that things require a little rocket science after all, if anything because of all these funny concepts it has; this ain't no Keep-It. The manual is quite scary but single users can skip all parts and jump straight to the repository creation section. Here's what I made of it: (all commands available from TSVN context menu)

  • First you need a folder that holds all SVN repositories (not essential but good practice) e.g. C:\SVN
  • In there you create a repository i.e. a folder on which you execute the context command Create repository here. That will create various subfolders under c:\SVN\YourTestProject
  • Then you go to the folder that holds your "original" files, select it (the folder, not the files), and pick Import command, passing it the name of the repository created in the previous step, i.e. file:///c:/svn/YourTestProject. Note the use of forward slashes.
  • Finally you create the empty working folder, wherever you want, e.g in c:\working. You fill it up with the repository contents using SVN Checkout and the name of the repository again to specify the source.

This means that for a single original folder with a project, you end up with three if you want version control: the original (unmodified), a global repository of it that holds the history, and the working folder where you have the latest version of the controlled files. A bit messy but in the end of the day you will only be dealing with one folder c:\working making changes to files as necessary. Every now and then you will issue a SVN Commit command to take a snapshot of the current version. The trick thing about it is that it allows you to compare the changes you made to individual files, with the last version committed using its own TortoiseMerge, which is good but sometimes I long for the trusty windiff which can also tell you about parts of code that were merely moved around, but I digress.

Bit of a headache, no? I'm sure that you'll hit the help files many times in frustration but in the end it grows on you.

Finally let's see how xplorer˛ can help us work with document revisions. TortoiseSVN adds icon overlays and column handlers for files in controlled working folders. The accompanying video (see the top of this article play demo button) explains how you turn on these icon overlays and some cool tricks you can do with xplorer˛ hyperfilters which allow you e.g. to select all files that were modified since last commit.

Post a comment on this topic

Addendum: After a couple of years using TSVN I have just discovered an easier way to create a repository on an existing project folder, avoiding the 3 folders problem I mentioned above. It is not very intuitive but it is described in the manual section 4.2.2 (import in place). The best way to illustrate it is through a demo video

It is also possible to see TSVN extra column handlers (SVN status, revision etc) in detailed view even in windows Vista and 7 using the latest xplorer˛

 

 

What would you like to do next?

Reclaim control of your files!
  • browse
  • preview
  • manage
  • locate
  • organize
Download xplorer2 free trial
"This powerhouse file manager beats the pants off Microsoft's built-in utility..."

download.com
© 2002—2007 Nikos Bozinis, all rights reserved