[Aptitude-devel] Tools 2: VCS

Daniel Burrows dburrows at debian.org
Fri May 14 03:26:10 UTC 2010

  Continuing the theme of examining aptitude's toolset, I'd like to take
a look at the VCS that we use.  Since several additional people will
start working on the project soon, it's going to become a lot harder
to switch VCSes.  At the moment I'm virtually the only committer [0], so
now is probably as good a time to switch as we'll have for a while.

  [0] I checked with "churn"; no-one else has committed a changeset
      since December 2009.

  This is sort of the opposite of the build tools question: I'm not sure
whether to switch away from mercurial, but I know exactly what I would
switch to if I did.  If I was starting aptitude today, I would pick git,
based on my experience using it on and off over the last few years.

  A few pros and cons off the top of my head -- if you've used both
systems, please add any that I missed:

  - git feels cleaner and more solid to me.  This is a subjective
    judgment, of course.

  - Where features exist in both git and mercurial, the git
    implementation seems to be more robust and/or featureful (e.g.,
    "hg shelve" vs "git stash", merging, handling of internal branches,
    "hg record" vs "git add -p", etc).

  - git seems to be more popular these days, so new contributors will
    be more likely to be familiar with it.

  - After getting used to it, I like the two-stage commit process.  It
    gives you an extra chance to review and fix the patch you're about
    to commit.

  - "git gui" is one of the only VCS GUIs I've seen that is regularly
    more useful than performing operations directly at the command-line.
    (I just wish it had the hunk-splitting powers of "git add -p")

  - Many features that are built into git require you to activate
    extensions in Mercurial.

 (these last three are fairly unimportant, but nice to have if you
  need them)

  - git provides more support for fiddling with history.

  - git delays actually deleting data from its repository, so it's
    possible to "undelete" patches if you screw up.

  - git is faster than mercurial (as far as I know).  aptitude is so
    small that this doesn't matter.

  - git has a clunkier UI; bad for people trying to learn it.  For
    instance, the command called "revert" in every other VCS I've
    used is called "checkout" in git.  There's a certain sense to this
    once you understand what "checkout" does, but it is rather puzzling
    at first.  To make matters worse, git *has* a "revert" command, but
    it does something totally different.

  - aptitude is already using mercurial, and people following the source
    repository would have to switch over to git.

  As far as the practicalities go, I found a script to convert an hg
repository to a git repository in a few minutes; it only took a few more
minutes to run it over the hg repository and get a git repository that
seems correct.  Much easier than when I switched from darcs to hg.


More information about the Aptitude-devel mailing list