How to enable Mercurial extensions (such as mq)?

mahmood picture mahmood · Dec 2, 2011 · Viewed 11.5k times · Source

I have installed Mercurial from the Ubuntu package repository. However I don't know how to enable extensions (q* commands). How should I do that? The help shows that

enabled extensions:
style  (no help text available)

I want to enable mq and hgk.

Answer

Matt Ball picture Matt Ball · Dec 2, 2011

Enable extensions in hgrc.

extensions

Mercurial has an extension mechanism for adding new features. To enable an extension, create an entry for it in this section.

If you know that the extension is already in Python's search path, you can give the name of the module, followed by =, with nothing after the =.

Otherwise, give a name that you choose, followed by =, followed by the path to the .py file (including the file name extension) that defines the extension.

...

Example for ~/.hgrc:

[extensions]
# (the mq extension will get loaded from Mercurial's path)
mq =
# (this extension will get loaded from the file specified)
myfeature = ~/.hgext/myfeature.py

http://www.selenic.com/mercurial/hgrc.5.html#extensions