Skip to content
Snippets Groups Projects
Commit 252396a6 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

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.
parent 419d7031
No related branches found
No related tags found
No related merge requests found
...@@ -151,6 +151,6 @@ ...@@ -151,6 +151,6 @@
loaded and registered with Mercurial. This means that you can find all enabled loaded and registered with Mercurial. This means that you can find all enabled
extensions with ``extensions.find`` in the following phases. extensions with ``extensions.find`` in the following phases.
ui setup Extension setup
-------- ---------------
...@@ -156,7 +156,11 @@ ...@@ -156,7 +156,11 @@
Extensions can implement an optional callback named ``uisetup``. ``uisetup`` There are two callbacks to be called when extensions are loaded, named
is called when the extension is first loaded and receives a ui object:: ``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): def uisetup(ui):
# ... # ...
...@@ -159,14 +163,7 @@ ...@@ -159,14 +163,7 @@
def uisetup(ui): def uisetup(ui):
# ... # ...
Extension setup def extsetup(ui):
---------------
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():
# ... # ...
...@@ -171,10 +168,6 @@ ...@@ -171,10 +168,6 @@
# ... # ...
Mercurial version 8e6019b16a7d and later (that is post-1.3.1) will pass In Mercurial 1.3.1 or earlier, ``extsetup`` takes no argument.
a ``ui``` argument to ``extsetup``::
def extsetup(ui):
# ...
Command table setup Command table setup
------------------- -------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment