Revision control is not just for source code - a morality tale

Posted by m.jackson on 12 November 2012 - 10:00am

MikeWarholised.jpgBy Mike Jackson.

During recent boot camps at Newcastle and Oxford I led a session on revision control (software used to manage changes made to files). At both boot camps, attendees asked whether revision control can be used for things other than source code. It can!

Revision control can be used for any files that require the history of changes made to the file to be saved, or any files which will be worked on by multiple authors. These files might be configuration files, parameter sets, model files, LaTeX source files for papers or reports, or Word or PowerPoint documents - revision control does not care, it's open to one and all.

Why is revision control useful for working on documents? To demonstrate, here's a short story about REF 2014. I've been working on a submission to the REF 2014 using two Word documents, one with my notes and one with my current draft of the submission. One day, I found that my notes file was empty, which meant that I must have accidently deleted the contents. But no worries, as revision control would allow me to retrieve my previous version before the contents were wiped.

In the paragraph above, I say "would allow" because I was not using revision control at the time. Instead, I had my live copy of the submission on one machine, and a backup copy on a different machine. It turned out that my backup copy was empty too. I must have backed up the empty copy of my live document before noticing that it was empty! Instead of quickly accessing an earlier, non-empty, version of my document from revision control, I had to compose an apologetic and red-faced email to our support team asking if they could retrieve an earlier version of my file from their nightly backups. Support retrieved my file with a caution that "You are lucky as it would have been overwritten in two more days, because backups are only kept for four weeks". Gulp!

I must also confess at this point that my submission drafts were in numbered files with such wonderful names as ImpactStatement0.1.doc, ImpactStatement0.2_to_JC.doc, ImpactStatement0.3_to_EPCCers.doc. I have now rectified this situation and both documents are now under revision control. It took two minutes to set up using Subversion.

So, the moral of this tale is that revision control is not just for source code and, if giving training in software development, one should be more diligent in practicing what one preaches. Off for a hefty portion of humble pie!

Share this page