git
I’ve been content with Mercurial as it’s fast and lets you do development and for the most part keeps out of your way. It has few dependences and is a great DVCS. However, the problem I am finding with Mercurial and one of the great benefit’s of DVCS is branching and Mercurial, I think, gets its branching legacy from CVS/Subversion.
To branch in Mercurial you basically clone the repository into a new repository and work in the new repository. For example, say you have repository A. Branching it involves running cloning A into B. You make your changes in B and merge them back into A when you are ready. This works but it sucks especially for Rails development which I do.
The way one usually does Rails development is you have a checkout of a repo and you run a development server and work on those changes. However, when you want to branch in Mercurial you have to go to the new directory and start a new server instance and develop, merge, stop the server, start new server, etc. For some of you this may be fine, but for me it is a pain in the ass!
This is one of the things I like about git all the branches are within the same directory tree so you don’t need to do all those change directories. You can basically branch within the same tree and work with that. No need to clone all these repos to different directories.
Now the things I dislike about git is that it’s written in C! When I went to install it on Debian it had n+1 different packages it had to install! Though, I am biased toward scripting languages I personally think it would have been easier to port the app in the long run.
However, another feature that I love about git is git-svn. It make branched development so easy as the branches are local so best of both worlds. This is especially since I work with a lot of subversion code bases. If I need to make different patches it makes it simpler to do so, especially when requirements change unexpectedly and you want to start a new branch without checking out the trunk again.
So I’m going to play with git for a bit longer, but overall for now I like it. The documentation has clearly improved since I last looked at it.
First, from what I have read you can work with multiple branches in single repository (in single clone) also in Mercurial, although they are second-class citizens. (BTW. as you can read in Junio C Hamano blog, multiple branches workflow is something that wasn’t “planned-in”, and just happened/was requested by users).
Second, you can always try to write either new porcelain (new UI), like Cogito was (bash), or Pyrite is meant to be (Python), although that wouldn’t solve problem with dependencies, or write new implementation of Git, like eGit/jGit (Java) and Widgit (C#, formerly gitRdone), in your favourite programming language.
BTW. do you know about Ruby/Git project to develop Ruby bindings in Git, and Git libification project?
Jakub Narebski
February 22, 2008 at 12:08 pm