[PATCH 3 of 4] help: expand the extensions topic
Cédric Duval
cedricduval at free.fr
Sat Jun 20 14:02:12 CDT 2009
# HG changeset patch
# User Cédric Duval <cedricduval at free.fr>
# Date 1245524150 -7200
# Node ID 7497bc3833c03c79bc410eb7009d5407d09b25e9
# Parent 34c094dfd6a93a402269a5ee8e7aa0840d5365b8
help: expand the extensions topic
diff --git a/mercurial/help.py b/mercurial/help.py
--- a/mercurial/help.py
+++ b/mercurial/help.py
@@ -127,13 +127,37 @@
def topicextensions():
doc = _(r'''
- Mercurial has an extension mechanism for adding new features.
+ Mercurial has a mechanism for adding new features through the
+ use of extensions. Extensions may bring new commands, or new
+ hooks, or change some behaviors of Mercurial.
- To enable an extension "foo" bundled with Mercurial, create an
- entry for it your hgrc, like this:
-
- [extensions]
- foo =
+ Extensions are not loaded by default for a variety of reasons,
+ they may be meant for an advanced usage or provide potentially
+ dangerous commands (eg. mq or rebase allow to rewrite history),
+ they might not be yet ready for prime-time, or they may alter
+ some usual behaviors of stock Mercurial. It is thus up to the
+ user to activate the extensions as needed.
+
+ To enable an extension "foo" which is either shipped with
+ Mercurial or in the Python search path, create an entry for
+ it in your hgrc, like this:
+
+ [extensions]
+ foo =
+
+ You may also specify the full path where an extension resides:
+
+ [extensions]
+ myfeature = ~/.hgext/myfeature.py
+
+ To explicitly disable an extension which is enabled in an hgrc
+ of broader scope, prepend its path with !:
+
+ [extensions]
+ # disabling extension bar residing in /ext/path
+ hgext.bar = !/path/to/extension/bar.py
+ # ditto, but no path was supplied for extension baz
+ hgext.baz = !
''')
exts, maxlength = enabledextensions()
More information about the Mercurial-devel
mailing list