mercurial/help.py
changeset 8865 37d8a5ddd499
parent 8864 cad6370a15cb
child 8871 20a25042fadc
equal deleted inserted replaced
8864:cad6370a15cb 8865:37d8a5ddd499
   125 
   125 
   126     return result
   126     return result
   127 
   127 
   128 def topicextensions():
   128 def topicextensions():
   129     doc = _(r'''
   129     doc = _(r'''
   130     Mercurial has an extension mechanism for adding new features.
   130     Mercurial has a mechanism for adding new features through the
   131 
   131     use of extensions. Extensions may bring new commands, or new
   132     To enable an extension "foo" bundled with Mercurial, create an
   132     hooks, or change some behaviors of Mercurial.
   133     entry for it your hgrc, like this:
   133 
   134     
   134     Extensions are not loaded by default for a variety of reasons,
   135        [extensions]
   135     they may be meant for an advanced usage or provide potentially
   136        foo =
   136     dangerous commands (eg. mq or rebase allow to rewrite history),
       
   137     they might not be yet ready for prime-time, or they may alter
       
   138     some usual behaviors of stock Mercurial. It is thus up to the
       
   139     user to activate the extensions as needed.
       
   140 
       
   141     To enable an extension "foo" which is either shipped with
       
   142     Mercurial or in the Python search path, create an entry for
       
   143     it in your hgrc, like this:
       
   144 
       
   145       [extensions]
       
   146       foo =
       
   147 
       
   148     You may also specify the full path where an extension resides:
       
   149 
       
   150       [extensions]
       
   151       myfeature = ~/.hgext/myfeature.py
       
   152 
       
   153     To explicitly disable an extension which is enabled in an hgrc
       
   154     of broader scope, prepend its path with !:
       
   155 
       
   156       [extensions]
       
   157       # disabling extension bar residing in /ext/path
       
   158       hgext.bar = !/path/to/extension/bar.py
       
   159       # ditto, but no path was supplied for extension baz
       
   160       hgext.baz = !
   137     ''')
   161     ''')
   138 
   162 
   139     exts, maxlength = enabledextensions()
   163     exts, maxlength = enabledextensions()
   140     doc += extensionslisting(_('enabled extensions:'), exts, maxlength)
   164     doc += extensionslisting(_('enabled extensions:'), exts, maxlength)
   141 
   165