An approach to revision control your documents using Mercurial
Posted in random | by evilbitz |This post describes how to control documents revisions under Windows. Warning - it involves the use of command line. I take it for granted that the average Linux guy will manage on his own.
I want to share something that I just recently did, I find it really useful - I put all the “My Documents” directory under local revision control. What it gives you? basically, an easy way to track changes inside documents. If you have, like me, thousands of documents that are continually evolving (I’m talking about the annoying Document History section…) and many different versions of each document, instead of renaming them and creating local copies I’m now using mercurial in order to put them under a revision control.
Mercurial is a “a fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects”, according to the website. It means that there is no central server and each user working on the project has a local copy of the whole repository on disk. The most important word in that sentence is “lightweight”.
So, after you downloaded Mercurial from the link above, create a directory under “My Documents” and name it whatever you would like to. Now, from the command line, cd into that directory and execute hg init, this will create a repository in that directory, every change could be tracked by executing hg status when you have a finalized version of the document that you want to take a snapshot of, execute hg commit -m “[Revision description goes here…]”…
That’s pretty much it, if you want to see the document history of each commit, execute hg log and see the details of each revision along with the comments you supplied.
But really, Mercurial is a powerful tool, you can read all about it here.