Next we need a way to manage the revisions we make to our programs. You may be thinking that you don’t need revision control because you are just one person and you can keep track of everything by yourself. That’s true as long as your program doesn’t get too big or go through many changes, but successful programs tend to get large. And over time they change in ways you may not expect. You might even find yourself deciding that you’d like to roll back a large change that you made – perhaps a wonderful new scene manager you were implementing turned out not to be so wonderful after all. And of course, if you ever start having other people working on the project, a way to coordinate changes becomes a must.
Revision control to the rescue! And the easiest one I’ve encountered so far is Mercurial. I’ve tried cvs and svn, and looked at git, and those all have their place, but Mercurial is the one that I’ve found to be most intuitive and unobtrusive. The commands are easy to understand and easy to use. It even comes with a way to create a web-based repository browser with a single command. Simply run “hg serve” from the main repository directory and you instantly get a website providing access to your code. How much easier could it be?
From the command line as root, run
$ yum install mercurial
From the command line, run
$ sudo apt-get install mercurial
Mercurials installer has no options to worry about. There are, however, two versions for you to consider. The official version and the TortoiseHG version. TortoiseHG includes the official command line tools as well as providing integration into the Windows Explorer graphical shell, so this is the one you really want to get. Simply download and run the installer file for TortoiseHG and you will be ready.