I am now in a condition to choose which Version Control System, so I would like to get some comment from experience developers who have used these. Which one i should use and in what condition?
To be fair, I have limited experience with Git and none with Hg, but one thing I miss about svn, perforce, etc the few times I do use it is a nice low integer revision number I can report to other developers.
Otherwise, Git has been pretty fantastic; it simplifies branching, which I use a ton, and usable offline, which is very nice when developing on my laptop.
Also, Github = Awesome.
I haven't gotten around to using either of the two, but I hope these links may be useful:
Remember that Git and Mercurial are both DVCS (Distributed Version Control), which is quite different than a Central VCS. See the core concepts SO question to get the differences.
Otherwise, you can also refer to Eric Weblog, where "Git is Wesley Snipes. Mercurial is Denzel Washington" ;)
I chose Bazaar and Git for the experience. But if I were choosing a DVCS as a regular user, I would choose Mercurial.
[...]
People admire Denzel Washington. But Wesley Snipes is simply more interesting.
Personally, I find Git more intuitive in term of branching and repository cloning, but Hg has better support on Windows (although I am pretty much content with msysgit)
See also "Difference between Git and Mercurial" SO question, in particular:
"Git is MacGyver and Mercurial is James Bond" ;)
Google Code recently chose Mercurial over Git for their system. In their analysis they found that Mercurial
- had an easier learning curve
- had good Windows support
- was easier to maintain
- ran faster over HTTP
Both are quite robust and versatile. Look at what colleagues and upstream projects are using, since using the same VCS makes collaboration easier.
As an open source developer, you will inevitably have contact with all the commonly-used VCS'. Looking at what systems various projects have chosen could be helpful. Python, Mozilla, OpenJDK are Mercurial users. Many smaller projects use Git, especially in the web space. And of course if you are doing kernel stuff you will want to use Git.
I use Git for my software projects and also to version my documentation, and am quite happy with its robustness and usability, ease of branching and merging, etc.
Mercurial (with which I have limited personal experience) has better portability (windows etc).
The GitHub folks have recently released a beta version of Hg-Git which purports to seamlessly bridge the gap between these two version control systems:
This is the Hg-Git plugin for Mercurial, adding the ability to push to and pull from a Git server repository from Hg. This means you can collaborate on Git based projects from Hg, or use a Git server as a collaboration point for a team with developers using both Git and Hg.
With the robust backend data stores in both Mercurial and Git, I think the line between these two competing version control systems will become quite blurred in the near future.