Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Mercurial extensions (such as mq)?

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.

like image 261
mahmood Avatar asked Dec 02 '11 17:12

mahmood


2 Answers

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

like image 93
Matt Ball Avatar answered Oct 19 '22 09:10

Matt Ball


You can also enable an extension without editing the hgrc, if you want to do it one off. [Source]

hg --config extensions.histedit= --help
like image 41
Pykler Avatar answered Oct 19 '22 09:10

Pykler