Tuesday, May 15, 2012

Create Repository Here

I love Mercurial.

Well, really, it's Mercurial + TortoiseHg, on Windows.  As a career-programmer and tinkerer, these things give me great delight.  Oh yes, certainly there are many different source code repositories out there, at this point, and there are compelling reasons to choose other ones.  But, the thing that Mercurial and TortoiseHg give me is this:

When I am tinkering on a casual personal programming project, and I know I'm about to really mess something up good, I just right-click in the directory where I'm working.  I select TortoiseHg > Create Repository Here.  (Or, from the command line, "hg init (project-directory)") My directory where I'm working is now both working directory and repository -- just like that!  I have no need for messing around with servers, or other directories, or launching special clients.  I just add my files, commit them, and then I can iterate to my heart's content, and roll back if I mess it up.

I lament that I had no such thing when I was a student.  I wonder how much time and heartbreak I would have saved, if I could have done such casual version control with my class projects.

No comments: