(filtered by tag 'vcs')

Use VCS also for home grown projects

Added: August 17, 2008

Tags: vcs

I started to develop my Photoblog about a half year ago. In the beginning I just wanted to try Rails and the best fit was to start with photo publishing application that I needed at that time. It was killing two birds with one stone, because I was not aware of any existing blogging application that would fit my needs. I wanted to publish many photos associated with prose-like text so galleries were out of question and blogging applications I've tried were clumsy regarding uploading many photos. But maybe the biggest excuse to do it myself was Rails :-) In the beginning I did not use any VCS. List of excuses contains following:

  • I am just playing with Rails
  • I am lazy to learn how to install Subversion on Win or force my brother that hosts the application to install it to FreeBSD.
  • app is not big enough to deserve VCS
Of course there were consequences:
  • fear of breaking it with too many changes and not being able to get back
  • all changes need to be small in order to avoid mentioned fear
  • (never needed for this blog, but I do it often in work) no history for artefacts. If something looks strange I like to check history to see how I got there
  • once deployed, unable to get back easily. You can imagine how often my production environment caused previously unseen problem. When that happened I needed to work fast to resolve it in production, because it was often easier that manual rollback to previous state
Recently I have adopted Mercurial. It is very easy to install, easy to use (I still have to undestand more complicated things regarding distibution of partial changes and merges of complicated setups), but has a few disadvantages like unfinished suport for Intellij IDEA and no merging tool. Still it is more than sufficient for my current needs. Now I can:
  • revert in case of messed code, wasting only time it took me to mess it, but not more.
  • explore new features without a need to finish previous one - I started to do gallery-like navigator in parallel with changes in layout, exploring different layouts and finally started to implement this IT blog, gallery and more. When I am happy with some feature and I like to move it to production, I just push to to main repository and merge.
  • do very easy rollback in production if I find "it will not be as easy as I thought to put it into production, but I do not have time to finish it immediately" (it might need keeping migrations correct and tested, but otherwise it is matter of hg revert 53
List of my favorite commands follows:
  • hg clone source dest
  • hg status
  • hg ci
  • hg up
  • hg push
  • hg revert
Here is link to Mercurial http://www.selenic.com/mercurial/wiki/

Point of this post is: "Listen to those telling you to use VCS for even smallest projects you do. They know what they are talking about".

I nearly forgot. I found about Mercurial (mainly how easy is to install it) thanks to Stephan Schmidt's blog here http://stephan.reposita.org/