Show More
@@ -175,11 +175,11 b' def load(ui, name, path, log=lambda *a: ' | |||
|
175 | 175 | return None |
|
176 | 176 | if shortname in _extensions: |
|
177 | 177 | return _extensions[shortname] |
|
178 |
log(' - loading extension: % |
|
|
178 | log(' - loading extension: %s\n', shortname) | |
|
179 | 179 | _extensions[shortname] = None |
|
180 |
with util.timedcm('load extension % |
|
|
180 | with util.timedcm('load extension %s', shortname) as stats: | |
|
181 | 181 | mod = _importext(name, path, bind(_reportimporterror, ui)) |
|
182 |
log(' > % |
|
|
182 | log(' > %s extension loaded in %s\n', shortname, stats) | |
|
183 | 183 | if loadingtime is not None: |
|
184 | 184 | loadingtime[shortname] += stats.elapsed |
|
185 | 185 | |
@@ -192,13 +192,13 b' def load(ui, name, path, log=lambda *a: ' | |||
|
192 | 192 | ui.warn(_('(third party extension %s requires version %s or newer ' |
|
193 | 193 | 'of Mercurial; disabling)\n') % (shortname, minver)) |
|
194 | 194 | return |
|
195 |
log(' - validating extension tables: % |
|
|
195 | log(' - validating extension tables: %s\n', shortname) | |
|
196 | 196 | _validatetables(ui, mod) |
|
197 | 197 | |
|
198 | 198 | _extensions[shortname] = mod |
|
199 | 199 | _order.append(shortname) |
|
200 |
log(' - invoking registered callbacks: % |
|
|
201 |
with util.timedcm('callbacks extension % |
|
|
200 | log(' - invoking registered callbacks: %s\n', shortname) | |
|
201 | with util.timedcm('callbacks extension %s', shortname) as stats: | |
|
202 | 202 | for fn in _aftercallbacks.get(shortname, []): |
|
203 | 203 | fn(loaded=True) |
|
204 | 204 | log(' > callbacks completed in %s\n', stats) |
@@ -251,7 +251,7 b' def loadall(ui, whitelist=None):' | |||
|
251 | 251 | if path: |
|
252 | 252 | if path[0:1] == '!': |
|
253 | 253 | if name not in _disabledextensions: |
|
254 |
log(' - skipping disabled extension: % |
|
|
254 | log(' - skipping disabled extension: %s\n', name) | |
|
255 | 255 | _disabledextensions[name] = path[1:] |
|
256 | 256 | continue |
|
257 | 257 | try: |
@@ -289,12 +289,12 b' def loadall(ui, whitelist=None):' | |||
|
289 | 289 | log('- executing uisetup hooks\n') |
|
290 | 290 | with util.timedcm('all uisetup') as alluisetupstats: |
|
291 | 291 | for name in _order[newindex:]: |
|
292 |
log(' - running uisetup for % |
|
|
293 |
with util.timedcm('uisetup % |
|
|
292 | log(' - running uisetup for %s\n', name) | |
|
293 | with util.timedcm('uisetup %s', name) as stats: | |
|
294 | 294 | if not _runuisetup(name, ui): |
|
295 |
log(' - the % |
|
|
295 | log(' - the %s extension uisetup failed\n', name) | |
|
296 | 296 | broken.add(name) |
|
297 |
log(' > uisetup for % |
|
|
297 | log(' > uisetup for %s took %s\n', name, stats) | |
|
298 | 298 | loadingtime[name] += stats.elapsed |
|
299 | 299 | log('> all uisetup took %s\n', alluisetupstats) |
|
300 | 300 | |
@@ -303,17 +303,17 b' def loadall(ui, whitelist=None):' | |||
|
303 | 303 | for name in _order[newindex:]: |
|
304 | 304 | if name in broken: |
|
305 | 305 | continue |
|
306 |
log(' - running extsetup for % |
|
|
307 |
with util.timedcm('extsetup % |
|
|
306 | log(' - running extsetup for %s\n', name) | |
|
307 | with util.timedcm('extsetup %s', name) as stats: | |
|
308 | 308 | if not _runextsetup(name, ui): |
|
309 |
log(' - the % |
|
|
309 | log(' - the %s extension extsetup failed\n', name) | |
|
310 | 310 | broken.add(name) |
|
311 |
log(' > extsetup for % |
|
|
311 | log(' > extsetup for %s took %s\n', name, stats) | |
|
312 | 312 | loadingtime[name] += stats.elapsed |
|
313 | 313 | log('> all extsetup took %s\n', allextetupstats) |
|
314 | 314 | |
|
315 | 315 | for name in broken: |
|
316 |
log(' - disabling broken % |
|
|
316 | log(' - disabling broken %s extension\n', name) | |
|
317 | 317 | _extensions[name] = None |
|
318 | 318 | |
|
319 | 319 | # Call aftercallbacks that were never met. |
@@ -324,7 +324,7 b' def loadall(ui, whitelist=None):' | |||
|
324 | 324 | continue |
|
325 | 325 | |
|
326 | 326 | for fn in _aftercallbacks[shortname]: |
|
327 |
log(' - extension % |
|
|
327 | log(' - extension %s not loaded, notify callbacks\n', | |
|
328 | 328 | shortname) |
|
329 | 329 | fn(loaded=False) |
|
330 | 330 | log('> remaining aftercallbacks completed in %s\n', stats) |
@@ -175,7 +175,7 b' def _peerorrepo(ui, path, create=False, ' | |||
|
175 | 175 | if hook: |
|
176 | 176 | with util.timedcm('reposetup %r', name) as stats: |
|
177 | 177 | hook(ui, obj) |
|
178 |
log(' > reposetup for % |
|
|
178 | log(' > reposetup for %s took %s\n', name, stats) | |
|
179 | 179 | log('> all reposetup took %s\n', allreposetupstats) |
|
180 | 180 | if not obj.local(): |
|
181 | 181 | for f in wirepeersetupfuncs: |
@@ -85,21 +85,21 b' show traceback for ImportError of hgext.' | |||
|
85 | 85 | > | egrep 'extension..[^p]|^Exception|Traceback|ImportError|not import|ModuleNotFound' |
|
86 | 86 | debug.extensions: loading extensions |
|
87 | 87 | debug.extensions: - processing 5 entries |
|
88 |
debug.extensions: - loading extension: |
|
|
89 |
debug.extensions: > |
|
|
90 |
debug.extensions: - validating extension tables: |
|
|
91 |
debug.extensions: - invoking registered callbacks: |
|
|
88 | debug.extensions: - loading extension: gpg | |
|
89 | debug.extensions: > gpg extension loaded in * (glob) | |
|
90 | debug.extensions: - validating extension tables: gpg | |
|
91 | debug.extensions: - invoking registered callbacks: gpg | |
|
92 | 92 | debug.extensions: > callbacks completed in * (glob) |
|
93 |
debug.extensions: - loading extension: |
|
|
93 | debug.extensions: - loading extension: badext | |
|
94 | 94 | *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow |
|
95 | 95 | Traceback (most recent call last): |
|
96 | 96 | Exception: bit bucket overflow |
|
97 |
debug.extensions: - loading extension: |
|
|
98 |
debug.extensions: > |
|
|
99 |
debug.extensions: - validating extension tables: |
|
|
100 |
debug.extensions: - invoking registered callbacks: |
|
|
97 | debug.extensions: - loading extension: baddocext | |
|
98 | debug.extensions: > baddocext extension loaded in * (glob) | |
|
99 | debug.extensions: - validating extension tables: baddocext | |
|
100 | debug.extensions: - invoking registered callbacks: baddocext | |
|
101 | 101 | debug.extensions: > callbacks completed in * (glob) |
|
102 |
debug.extensions: - loading extension: |
|
|
102 | debug.extensions: - loading extension: badext2 | |
|
103 | 103 | debug.extensions: - could not import hgext.badext2 (No module named *badext2*): trying hgext3rd.badext2 (glob) |
|
104 | 104 | Traceback (most recent call last): |
|
105 | 105 | ImportError: No module named badext2 (no-py3 !) |
@@ -121,16 +121,16 b' show traceback for ImportError of hgext.' | |||
|
121 | 121 | debug.extensions: > loaded 2 extensions, total time * (glob) |
|
122 | 122 | debug.extensions: - loading configtable attributes |
|
123 | 123 | debug.extensions: - executing uisetup hooks |
|
124 |
debug.extensions: - running uisetup for |
|
|
125 |
debug.extensions: > uisetup for |
|
|
126 |
debug.extensions: - running uisetup for |
|
|
127 |
debug.extensions: > uisetup for |
|
|
124 | debug.extensions: - running uisetup for gpg | |
|
125 | debug.extensions: > uisetup for gpg took * (glob) | |
|
126 | debug.extensions: - running uisetup for baddocext | |
|
127 | debug.extensions: > uisetup for baddocext took * (glob) | |
|
128 | 128 | debug.extensions: > all uisetup took * (glob) |
|
129 | 129 | debug.extensions: - executing extsetup hooks |
|
130 |
debug.extensions: - running extsetup for |
|
|
131 |
debug.extensions: > extsetup for |
|
|
132 |
debug.extensions: - running extsetup for |
|
|
133 |
debug.extensions: > extsetup for |
|
|
130 | debug.extensions: - running extsetup for gpg | |
|
131 | debug.extensions: > extsetup for gpg took * (glob) | |
|
132 | debug.extensions: - running extsetup for baddocext | |
|
133 | debug.extensions: > extsetup for baddocext took * (glob) | |
|
134 | 134 | debug.extensions: > all extsetup took * (glob) |
|
135 | 135 | debug.extensions: - executing remaining aftercallbacks |
|
136 | 136 | debug.extensions: > remaining aftercallbacks completed in * (glob) |
@@ -46,23 +46,23 b' Test extension setup timings' | |||
|
46 | 46 | $ hg foo --traceback --config devel.debug.extensions=yes --debug 2>&1 |
|
47 | 47 | debug.extensions: loading extensions |
|
48 | 48 | debug.extensions: - processing 1 entries |
|
49 |
debug.extensions: - loading extension: |
|
|
50 |
debug.extensions: > |
|
|
51 |
debug.extensions: - validating extension tables: |
|
|
52 |
debug.extensions: - invoking registered callbacks: |
|
|
49 | debug.extensions: - loading extension: foobar | |
|
50 | debug.extensions: > foobar extension loaded in * (glob) | |
|
51 | debug.extensions: - validating extension tables: foobar | |
|
52 | debug.extensions: - invoking registered callbacks: foobar | |
|
53 | 53 | debug.extensions: > callbacks completed in * (glob) |
|
54 | 54 | debug.extensions: > loaded 1 extensions, total time * (glob) |
|
55 | 55 | debug.extensions: - loading configtable attributes |
|
56 | 56 | debug.extensions: - executing uisetup hooks |
|
57 |
debug.extensions: - running uisetup for |
|
|
57 | debug.extensions: - running uisetup for foobar | |
|
58 | 58 | uisetup called [debug] |
|
59 | 59 | uisetup called |
|
60 | 60 | uisetup called [status] |
|
61 |
debug.extensions: > uisetup for |
|
|
61 | debug.extensions: > uisetup for foobar took * (glob) | |
|
62 | 62 | debug.extensions: > all uisetup took * (glob) |
|
63 | 63 | debug.extensions: - executing extsetup hooks |
|
64 |
debug.extensions: - running extsetup for |
|
|
65 |
debug.extensions: > extsetup for |
|
|
64 | debug.extensions: - running extsetup for foobar | |
|
65 | debug.extensions: > extsetup for foobar took * (glob) | |
|
66 | 66 | debug.extensions: > all extsetup took * (glob) |
|
67 | 67 | debug.extensions: - executing remaining aftercallbacks |
|
68 | 68 | debug.extensions: > remaining aftercallbacks completed in * (glob) |
@@ -87,7 +87,7 b' Test extension setup timings' | |||
|
87 | 87 | debug.extensions: - running reposetup for foobar |
|
88 | 88 | reposetup called for a |
|
89 | 89 | ui == repo.ui |
|
90 |
debug.extensions: > reposetup for |
|
|
90 | debug.extensions: > reposetup for foobar took * (glob) | |
|
91 | 91 | debug.extensions: > all reposetup took * (glob) |
|
92 | 92 | Foo |
|
93 | 93 |
General Comments 0
You need to be logged in to leave comments.
Login now