Azitech

Azimout's Linux weblog

Mercurial

with 10 comments

Mercurial is a great, open source (GPLv2), cross-platform, DRCS (distributed revision control system).

  • A good open source book about it is Mercurial: The Definitive Guide.
  • A very useful tool to make working with Mercurial easier is TortoiseHG.
  • The easiest way to share a repository (allowing also pushes) between a Linux and a Windows system is to share the directory containing the repository on Linux with Samba and mount it as a network drive on Windows (works only on intranets).
  • You can see a graph of your repository by running hgtk explorer (provided you have installed TortoiseHG),ย or by running Mercurial’s stand-alone webserver (with hg serve) and then pointing your browser at localhost:8000
Advertisements

Written by azimout

02/02/2011 at 09:16

Posted in Reference

10 Responses

Subscribe to comments with RSS.

  1. I prefer Git because of GitHub ๐Ÿ™‚

    Danilo

    20/02/2011 at 16:42

    • The equivalent for HG seems to be BitBucket (never tried it). Besides, SourceForge does everything: Bazaar, Git, Mercurial.

      Any good comparisons of Git vs. Mercurial?

      azimout

      20/02/2011 at 16:49

      • I prefer GitHub over BitBucket. There was a comparison online that has now been taken offline, that compared those two sites and showed that BitBucket is – in many aspects – simply a copy of GitHub. GitHub was first and also has much more users, the latter one is its main advantage in my opinion.

        GitHub/BitBucket are magnitudes better than SourceForge if you primarily need a VCS. They also encourage forking and bring more of a “community feeling” to programming. You should really try them, you’ll never want to go back to SourceForge ๐Ÿ™‚

        As for comparisons, those generally suck, but here are two good ones:
        http://importantshock.wordpress.com/2008/08/07/git-vs-mercurial/
        http://www.rockstarprogrammer.org/post/2008/apr/06/differences-between-mercurial-and-git/

        If you want to know more about Git, watch Linus Torvalds’ very entertaining talk: http://www.youtube.com/watch?v=4XpnKHJAok8

        I think one of the greatest advantages of Git are the great history manipulation tools. They have to be understood well, but then you will learn to love them ๐Ÿ™‚

        Danilo

        21/02/2011 at 15:59

  2. Yeah, the second comparison is definitely better.

    In the first one he’s saying:
    “Git lacks this feature of Mercurial, but look how you can do it with this complicated command!”
    and then further down:
    “Mercurial lacks this feature of Git. There are a couple of ways around this, but that’s unacceptable!”

    Anyway, I don’t like (both philosophically, and from an engineering point of view) how you can “rewrite history” in git.

    Maybe I’ll use git in another project, and then I’ll write a comparison myself ๐Ÿ™‚

    PS Are you a Git door-to-door missionary like the ones RockStarProgrammer mentions towards the end?

    azimout

    21/02/2011 at 17:10

    • As long as it’s local, rewriting your history is fantastic. For example, if you commited with the wrong e-mail address. Or if you want to rewrite your name on the entire history before pushing it to a public repository.

      Anyways, there are also things that Git handles better imo. For example the way the objects are stored. Mercurial stores diffs, Git stores revisions.

      PS: You are of course free to use Mercurial, I haven’t used it yet but it must be pretty cool. I am just trying to show the pros and cons of git as I think it is pretty awesome (and I prefer its Unix-like philosophy). If with missionary you mean someone spreading the word about something he likes, then yes. If you mean someone that wants to convert other people from what they like, then no ๐Ÿ™‚

      Danilo

      21/02/2011 at 17:40

  3. Ok, thanks for all the useful advice Danilo.

    What are you working on lately? Something I can look at on GitHub?

    azimout

    21/02/2011 at 17:45

    • Probably nothing really useful to you ๐Ÿ™‚ Most active one is Pyxtra, some webpage scraping in order to send SMS messages with Swisscom.

      https://github.com/gwrtheyrn

      What about you?

      Danilo

      21/02/2011 at 17:52

      • Nothing I can share right now, but I’m hoping to convince my employer to share my work project as open-source, I’ll let you know. It’s about monitoring ionospheric scintillation (caused by sun flares) using GPS signals, and it’s written in Python.

        azimout

        21/02/2011 at 18:22

      • Sounds interesting ๐Ÿ™‚ Seems Python is used a lot for scientific and data-analysis work.

        Danilo

        21/02/2011 at 18:28

  4. Yes, it’s used more and more. The other tool used a lot is R. Matlab is nice for universities because of the academic licensing, and because it so well established, complete and mature.

    But you can’t beat free (as in beer and as in speech). I like the idea that I can share my code with anyone interested and they can run it without having to by Matlab (Octave more or less works, but it’s cumbersome, and there are some incompatibilities in plotting).

    azimout

    21/02/2011 at 18:49


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: