mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
a19b7f0a32
We tell people all the time that enabling extensions is not a scary thing to do, but we don't make it easy enough for an absolute novice to do so. When they see a suggestion to do "hg extfoo bar", the error message tells them "see hg help extensions", but that help page doesn't actually tell them where configuration files are. Furthermore, the big warning about why extensions aren't enabled by default should be pushed down a little bit. Most of the extensions shipped by hg are not all that scary, and some very basic and useful cosmetic extensions like graphlog, color, pager, and progress, should be enabled for many hg users.
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
Mercurial has the ability to add new features through the use of
|
|
extensions. Extensions may add new commands, add options to
|
|
existing commands, change the default behavior of commands, or
|
|
implement hooks.
|
|
|
|
To enable the "foo" extension, either shipped with Mercurial or in the
|
|
Python search path, create an entry for it in your configuration file,
|
|
like this::
|
|
|
|
[extensions]
|
|
foo =
|
|
|
|
You may also specify the full path to an extension::
|
|
|
|
[extensions]
|
|
myfeature = ~/.hgext/myfeature.py
|
|
|
|
See :hg:`help config` for more information on configuration files.
|
|
|
|
Extensions are not loaded by default for a variety of reasons:
|
|
they can increase startup overhead; they may be meant for advanced
|
|
usage only; they may provide potentially dangerous abilities (such
|
|
as letting you destroy or modify history); they might not be ready
|
|
for prime time; or they may alter some usual behaviors of stock
|
|
Mercurial. It is thus up to the user to activate extensions as
|
|
needed.
|
|
|
|
To explicitly disable an extension enabled in a configuration file of
|
|
broader scope, prepend its path with !::
|
|
|
|
[extensions]
|
|
# disabling extension bar residing in /path/to/extension/bar.py
|
|
bar = !/path/to/extension/bar.py
|
|
# ditto, but no path was supplied for extension baz
|
|
baz = !
|