Learning Distributed Revision Control Systems

Like it or not, the distributed revision control model is here to stay. Brian Fitzpatrick, a Subversion and Apache developer, told a group of us Purdue students that SVN will indeed be getting distributed features similar to “the Mercurial model.” Many companies are already starting to use DRCS and the rest are on their way.

The quickest and easiest way I can explain a DRCS to a developer who’s only used a centralized revision control system is like this: a DRCS is like all developers having their own local repository. When it’s time to share changes, it’s almost like having a CVS repository of CVS repositories. Among local commits and cheap branching, there are many other great benefits of a DRCS that I wont go into. What I will talk about are some resources and techniques for learning a DRCS.

Enumeration of DRCSs

There are a few major players in the DRCS area, today. They all embody the same general model and feature set but each system also fills a certain niche.

  • Monotone: One of the earlier DRCSs. Written in C++.
  • Git: Created by Linus Torvalds for the Linux kernel project. Written in C.
  • Bazaar: Canonical’s DRVS written in Python. Works well with all OSs.
  • Mercurial: Also written for the Linux kernel project in C and Python. Works well with all OSs.

Videos

Like I’ve said before, the best way to learn anything technical related is to watch tech talks about it. This holds true for a DRCS as well.

  1. Linus Torvalds’ Git Google Tech Talk: Explains why programmers should use a DRCS. Linus is the creator of Git as well as the project it was designed for: the Linux kernel.
  2. Randal Schwartz’s Git Google Tech Talk: Explains how to use Git. Randal is a prominent Perl author and long time Git hacker.
  3. Bryan O’Sullivan’s Mercurial Google Tech Talk: Explains how to use Mercurial and why a programmer would want to use it. Bryan is a Senior Principal Engineer at QLogic, Inc and Mercurial developer.

Books & Documentation

Nobody wants to read massive books and documentation sets on their computer but for reference, they exist. Watch the videos to learn about DVCSs and then use these resources for reference during projects.

A colleague of mine, Michael Olson, has some great articles about using Git and also some commentary about SVN that are definitely worth reading. It’s not up to people to teach you how to use a DRCS, it’s up to you to make sure you don’t get behind the times. If you have trouble or just plain dislike learning new technologies then maybe computer science is not your path.

    None Found
  • http://www.stonehenge.com/merlyn/ Randal L. Schwartz

    Thanks for referencing my Google Git Talk!

  • http://www.stonehenge.com/merlyn/ Randal L. Schwartz

    Thanks for referencing my Google Git Talk!

  • http://lukehoersten.com/ Luke Hoersten

    No problem! It was a great talk that was desperately needed! Hopefully this will help a few more people learn Git.

  • http://lukehoersten.com/ Luke Hoersten

    No problem! It was a great talk that was desperately needed! Hopefully this will help a few more people learn Git.

  • http://mwolson.org/ Michael Olson

    I also enjoyed Randal’s talk. I’m going to be using it in some various bits of advocacy the next few days. He explains particularly well the fact that all you need to know is one SHA-1 hash to know that your repo is uncorrupted — I had a hard time remembering enough of the explanation earlier to get that point across.

  • http://mwolson.org/ Michael Olson

    I also enjoyed Randal’s talk. I’m going to be using it in some various bits of advocacy the next few days. He explains particularly well the fact that all you need to know is one SHA-1 hash to know that your repo is uncorrupted — I had a hard time remembering enough of the explanation earlier to get that point across.

  • http://lukehoersten.com/ Luke Hoersten

    Randal’s talk is great and it’s actually what inspired me to write this article. It was kind of the final piece needed to complete the puzzle for people trying to learn about [Git] DRCSs.

    The SHA-1 hash of the repo isn’t that complex of an idea, it’s just that there are trade-offs of some features for others. The biggest benefit for me would be the handling of binaries, not the guarantee of tree integrity.

  • http://lukehoersten.com/ Luke Hoersten

    Randal’s talk is great and it’s actually what inspired me to write this article. It was kind of the final piece needed to complete the puzzle for people trying to learn about [Git] DRCSs.

    The SHA-1 hash of the repo isn’t that complex of an idea, it’s just that there are trade-offs of some features for others. The biggest benefit for me would be the handling of binaries, not the guarantee of tree integrity.

  • http://agoln.net Logan Buesching

    I’m not sure when they added it, but they now have a “Batteries Included” installer for Mercurial, which would have probably shut me up from all of my complaining about it’s lack of windows support – this should by far be more heavily advertised for windows users.

  • http://agoln.net Logan Buesching

    “Batteries Included” installer for Mercurial, which would have probably shut me up from all of my complaining about it’s lack of windows support – this should by far be more heavily advertised for windows users.

  • Pingback: OpenRadix.org → Shortcomings of Mercurial

  • Robert Goldman

    Another DRCS is darcs. Written, I believe, in Haskell.

  • https://www.humani.st Luke Hoersten

    I’ve hear quite a bit about darcs (most DRCS emacs modes are based on the darcs mode) though I’ve never used it myself. Do you have much experience with it? Any comments about it?

  • Pingback: Humani.st → Shortcomings of Mercurial

  • Peter Plys

    Does anybody know of any unbiased comparison of the *current* versions of git, GNU Bazaar and Mercurial?

    All I’ve seen is rather old (DVCS are young and changing quickly).
    Bazaar is now pretty fast, git is becoming easy to use and crossplatform, Mercurial has reached v1.0…

  • https://www.humani.st Luke Hoersten

    You’re completely right about them being fast moving. They’re almost all different beasts now. I started using Git full time again last week and it definitely still had the same interface issues compared to Mercurial. I haven’t used Bazaar at all for quite some time and haven’t tried Mercurial v1.0 yet (I still use 0.9.5 every day).

    If the changes are enough to negate my opinions about each system, I will totally write about it. I still think Mercurial, despite being one of the youngest, has the most potential. Git would have to revamp the entire command line interface to catch up in my opinion.

  • ning

    Great introduction! It showed me where I should go further to. Thanks a lot.

  • https://www.humani.st Luke Hoersten

    No problem. When I was first learning about DRCS the docs were slim and the human explanations were even slimmer so I started collecting my favorite sources as I went along. Hopefully this will help convince your teammates as well that DRCS is here to say!

  • https://www.humani.st Luke Hoersten

    No problem. When I was first learning about DRCS the docs were slim and the human explanations were even slimmer so I started collecting my favorite sources as I went along. Hopefully this will help convince your teammates as well that DRCS is here to say!