Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Nine awesome features and extensions for Mercurial (zeroturnaround.com)
41 points by lelf on Dec 6, 2013 | hide | past | favorite | 13 comments


If I understand these correctly, I can come up with this mapping between Hg <--> Git

    rebase <--> rebase
    histedit <--> rebase -i
    shelve <--> stash
    unbundle <--> ???
    purge <--> clean -x -d -f
    alias <--> [alias] section in gitconfig
    color <--> [color.*] section in gitconfig
    progress <--> ???
    pager <--> core.pager in gitconfig


unbundle is probably closest to git reflog


Git has its own bundle/unbundle commands. AFAIK, the reflog simply has no equivalent in Hg.


I know it's more common today to use histedit, shelve, rebase, etc; but I have personally found the mq extension to subsume all of those (although it's more complicated than the other extensions).

I am genuinely happy with hg when I use it, and find it wonderful as a user, most of the time.


My favorite: crecord ( http://mercurial.selenic.com/wiki/CrecordExtension)

A curses record extension that lets you commit on a lie by line basis.


"lie by line basis" is a nice typo.


This makes commits that have not been tested.


You can test before pushing anyway.

I was surprise that the record extention was not in the list. Didn't no the crecord!


Not sure about hg, but in git, do a git stash --keep-index , then do your testing.


Crecord is great. Someone has made a fork that works on Windows[1]. The regular one is only for Mac and Linux. (Haven't tried the Windows one myself, but I do like using crecord on my Mac at work.)

[1] https://bitbucket.org/jmb/crecord


Thanks for mentioning this! I have the 'record' extension enabled on my Windows box, but I'm going to try this fork here and see. Will add this onto the Hg wiki as well.


When will mercurial learn that these things should be default. One of the only reasons I moved to git was I didn't have to hand hold people setting up all the extensions.


Whenever I teach hg, I just give them a template .hgrc and the first lesson is about putting their name in there. It's a one-time cost for any Mercurial user.

The Mercurial dev team is very conservative. The reason some of these extensions aren't default yet are due to bugs or because they don't work well on Windows or because they require the user to learn some advanced usage (e.g. an improper rebase can result in apparent data loss to the uninitiated). Some of these just have a plain yucky UI, e.g. histedit's UI is very close to "git rebase -i". It would be much nicer if it had some sort of curses interface instead.

Mercurial is in this for long haul, and it gets better all the time. As its extensions mature, they'll be turned on by default. Right now, it's a matter of flipping them on.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: