##// END OF EJS Templates
help: merge section about uisetup() and extsetup()...
Yuya Nishihara -
r40632:252396a6 default
parent child Browse files
Show More
@@ -151,30 +151,23 b' before the next phase begins. In the fir'
151 loaded and registered with Mercurial. This means that you can find all enabled
151 loaded and registered with Mercurial. This means that you can find all enabled
152 extensions with ``extensions.find`` in the following phases.
152 extensions with ``extensions.find`` in the following phases.
153
153
154 ui setup
154 Extension setup
155 --------
155 ---------------
156
156
157 Extensions can implement an optional callback named ``uisetup``. ``uisetup``
157 There are two callbacks to be called when extensions are loaded, named
158 is called when the extension is first loaded and receives a ui object::
158 ``uisetup`` and ``extsetup``. ``uisetup`` is called first for each extension,
159 then ``extsetup`` is called. This means ``extsetup`` can be useful in case
160 one extension optionally depends on another extension.
161
162 Both ``uisetup`` and ``extsetup`` receive a ui object::
159
163
160 def uisetup(ui):
164 def uisetup(ui):
161 # ...
165 # ...
162
166
163 Extension setup
167 def extsetup(ui):
164 ---------------
165
166 Extensions can implement an optional callback named ``extsetup``. It is
167 called after all the extension are loaded, and can be useful in case one
168 extension optionally depends on another extension. Signature::
169
170 def extsetup():
171 # ...
168 # ...
172
169
173 Mercurial version 8e6019b16a7d and later (that is post-1.3.1) will pass
170 In Mercurial 1.3.1 or earlier, ``extsetup`` takes no argument.
174 a ``ui``` argument to ``extsetup``::
175
176 def extsetup(ui):
177 # ...
178
171
179 Command table setup
172 Command table setup
180 -------------------
173 -------------------
General Comments 0
You need to be logged in to leave comments. Login now