changeset 40643:252396a6a3f2

help: merge section about uisetup() and extsetup() They are technically the same callback, called only once per process. The section name "ui setup" is confusing, so shouldn't be used.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 12 Nov 2018 22:26:24 +0900
parents 419d703115b0
children 04d08f17ce7a
files mercurial/help/internals/extensions.txt
diffstat 1 files changed, 10 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/help/internals/extensions.txt	Mon Nov 12 21:28:54 2018 +0900
+++ b/mercurial/help/internals/extensions.txt	Mon Nov 12 22:26:24 2018 +0900
@@ -151,30 +151,23 @@
 loaded and registered with Mercurial. This means that you can find all enabled
 extensions with ``extensions.find`` in the following phases.
 
-ui setup
---------
+Extension setup
+---------------
 
-Extensions can implement an optional callback named ``uisetup``. ``uisetup``
-is called when the extension is first loaded and receives a ui object::
+There are two callbacks to be called when extensions are loaded, named
+``uisetup`` and ``extsetup``. ``uisetup`` is called first for each extension,
+then ``extsetup`` is called. This means ``extsetup`` can be useful in case
+one extension optionally depends on another extension.
+
+Both ``uisetup`` and ``extsetup`` receive a ui object::
 
     def uisetup(ui):
         # ...
 
-Extension setup
----------------
-
-Extensions can implement an optional callback named ``extsetup``. It is
-called after all the extension are loaded, and can be useful in case one
-extension optionally depends on another extension. Signature::
-
-    def extsetup():
+    def extsetup(ui):
         # ...
 
-Mercurial version 8e6019b16a7d and later (that is post-1.3.1) will pass
-a ``ui``` argument to ``extsetup``::
-
-    def extsetup(ui):
-        # ...
+In Mercurial 1.3.1 or earlier, ``extsetup`` takes no argument.
 
 Command table setup
 -------------------