如何启用Mercurial扩展(例如mq)?

mah*_*ood 19 mercurial mercurial-queue mercurial-extension

我从Ubuntu包存储库安装了Mercurial.但是我不知道如何启用扩展(q*命令).我该怎么办?帮助表明了这一点

enabled extensions:
style  (no help text available)
Run Code Online (Sandbox Code Playgroud)

我想启用mq和hgk.

Mat*_*all 19

启用扩展程序hgrc.

扩展

Mercurial具有添加新功能的扩展机制.要启用扩展,请在此部分中为其创建条目.

如果你知道扩展已经在Python的搜索路径中了,你可以给出模块的名称,然后=在之后没有任何内容 =.

否则,请提供您选择的名称,后跟=,然后.py是定义扩展名的文件路径(包括文件扩展名).

...

示例~/.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
Run Code Online (Sandbox Code Playgroud)

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


Pyk*_*ler 7

如果您想要一次性完成,也可以在不编辑hgrc的情况下启用扩展.[资源]

hg --config extensions.histedit= --help
Run Code Online (Sandbox Code Playgroud)