##// END OF EJS Templates
exthelper: add some semi-useful trace logs...
Augie Fackler -
r42507:c07dcf7a default
parent child Browse files
Show More
@@ -15,9 +15,12 b' from . import ('
15 commands,
15 commands,
16 error,
16 error,
17 extensions,
17 extensions,
18 pycompat,
18 registrar,
19 registrar,
19 )
20 )
20
21
22 from hgdemandimport import tracing
23
21 class exthelper(object):
24 class exthelper(object):
22 """Helper for modular extension setup
25 """Helper for modular extension setup
23
26
@@ -135,7 +138,8 b' class exthelper(object):'
135 for cont, funcname, wrapper in self._functionwrappers:
138 for cont, funcname, wrapper in self._functionwrappers:
136 extensions.wrapfunction(cont, funcname, wrapper)
139 extensions.wrapfunction(cont, funcname, wrapper)
137 for c in self._uicallables:
140 for c in self._uicallables:
138 c(ui)
141 with tracing.log(b'finaluisetup: %s', pycompat.sysbytes(repr(c))):
142 c(ui)
139
143
140 def finaluipopulate(self, ui):
144 def finaluipopulate(self, ui):
141 """Method to be used as the extension uipopulate
145 """Method to be used as the extension uipopulate
@@ -175,7 +179,8 b' class exthelper(object):'
175 entry[1].append(opt)
179 entry[1].append(opt)
176
180
177 for c in self._extcallables:
181 for c in self._extcallables:
178 c(ui)
182 with tracing.log(b'finalextsetup: %s', pycompat.sysbytes(repr(c))):
183 c(ui)
179
184
180 def finalreposetup(self, ui, repo):
185 def finalreposetup(self, ui, repo):
181 """Method to be used as the extension reposetup
186 """Method to be used as the extension reposetup
@@ -187,7 +192,8 b' class exthelper(object):'
187 - Changes to repo.__class__, repo.dirstate.__class__
192 - Changes to repo.__class__, repo.dirstate.__class__
188 """
193 """
189 for c in self._repocallables:
194 for c in self._repocallables:
190 c(ui, repo)
195 with tracing.log(b'finalreposetup: %s', pycompat.sysbytes(repr(c))):
196 c(ui, repo)
191
197
192 def uisetup(self, call):
198 def uisetup(self, call):
193 """Decorated function will be executed during uisetup
199 """Decorated function will be executed during uisetup
General Comments 0
You need to be logged in to leave comments. Login now