Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/extensions.py (20 lines) | |||
M | tests/test-bad-extension.t (1 line) | |||
M | tests/test-extension-timing.t (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Boris Feld | Sep 6 2018, 4:21 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan |
with util.timedcm('uisetup %r', name) as stats: | with util.timedcm('uisetup %r', name) as stats: | ||||
if not _runuisetup(name, ui): | if not _runuisetup(name, ui): | ||||
log(' - the %r extension uisetup failed\n', name) | log(' - the %r extension uisetup failed\n', name) | ||||
broken.add(name) | broken.add(name) | ||||
log(' > uisetup for %r took %s\n', name, stats) | log(' > uisetup for %r took %s\n', name, stats) | ||||
log('> all uisetup took %s\n', alluisetupstats) | log('> all uisetup took %s\n', alluisetupstats) | ||||
log('- executing extsetup hooks\n') | log('- executing extsetup hooks\n') | ||||
with util.timedcm('all extsetup') as allextetupstats: | |||||
for name in _order[newindex:]: | for name in _order[newindex:]: | ||||
if name in broken: | if name in broken: | ||||
continue | continue | ||||
log(' - running extsetup for %r\n', name) | log(' - running extsetup for %r\n', name) | ||||
with util.timedcm('extsetup %r', name) as stats: | with util.timedcm('extsetup %r', name) as stats: | ||||
if not _runextsetup(name, ui): | if not _runextsetup(name, ui): | ||||
log(' - the %r extension extsetup failed\n', name) | log(' - the %r extension extsetup failed\n', name) | ||||
broken.add(name) | broken.add(name) | ||||
log(' > extsetup for %r took %s\n', name, stats) | log(' > extsetup for %r took %s\n', name, stats) | ||||
log('> all extsetup took %s\n', allextetupstats) | |||||
for name in broken: | for name in broken: | ||||
log(' - disabling broken %r extension\n', name) | log(' - disabling broken %r extension\n', name) | ||||
_extensions[name] = None | _extensions[name] = None | ||||
# Call aftercallbacks that were never met. | # Call aftercallbacks that were never met. | ||||
log('- executing remaining aftercallbacks\n') | log('- executing remaining aftercallbacks\n') | ||||
with util.timedcm('aftercallbacks') as stats: | with util.timedcm('aftercallbacks') as stats: |
debug.extensions: - running uisetup for 'baddocext' | debug.extensions: - running uisetup for 'baddocext' | ||||
debug.extensions: > uisetup for 'baddocext' took * (glob) | debug.extensions: > uisetup for 'baddocext' took * (glob) | ||||
debug.extensions: > all uisetup took * (glob) | debug.extensions: > all uisetup took * (glob) | ||||
debug.extensions: - executing extsetup hooks | debug.extensions: - executing extsetup hooks | ||||
debug.extensions: - running extsetup for 'gpg' | debug.extensions: - running extsetup for 'gpg' | ||||
debug.extensions: > extsetup for 'gpg' took * (glob) | debug.extensions: > extsetup for 'gpg' took * (glob) | ||||
debug.extensions: - running extsetup for 'baddocext' | debug.extensions: - running extsetup for 'baddocext' | ||||
debug.extensions: > extsetup for 'baddocext' took * (glob) | debug.extensions: > extsetup for 'baddocext' took * (glob) | ||||
debug.extensions: > all extsetup took * (glob) | |||||
debug.extensions: - executing remaining aftercallbacks | debug.extensions: - executing remaining aftercallbacks | ||||
debug.extensions: > remaining aftercallbacks completed in * (glob) | debug.extensions: > remaining aftercallbacks completed in * (glob) | ||||
debug.extensions: - loading extension registration objects | debug.extensions: - loading extension registration objects | ||||
debug.extensions: > extension registration object loading took * (glob) | debug.extensions: > extension registration object loading took * (glob) | ||||
debug.extensions: extension loading complete | debug.extensions: extension loading complete | ||||
#endif | #endif | ||||
confirm that there's no crash when an extension's documentation is bad | confirm that there's no crash when an extension's documentation is bad | ||||
$ hg help --keyword baddocext | $ hg help --keyword baddocext | ||||
*** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow | *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow | ||||
*** failed to import extension badext2: No module named badext2 | *** failed to import extension badext2: No module named badext2 | ||||
Topics: | Topics: | ||||
extensions Using Additional Features | extensions Using Additional Features |
uisetup called [debug] | uisetup called [debug] | ||||
uisetup called | uisetup called | ||||
uisetup called [status] | uisetup called [status] | ||||
debug.extensions: > uisetup for 'foobar' took * (glob) | debug.extensions: > uisetup for 'foobar' took * (glob) | ||||
debug.extensions: > all uisetup took * (glob) | debug.extensions: > all uisetup took * (glob) | ||||
debug.extensions: - executing extsetup hooks | debug.extensions: - executing extsetup hooks | ||||
debug.extensions: - running extsetup for 'foobar' | debug.extensions: - running extsetup for 'foobar' | ||||
debug.extensions: > extsetup for 'foobar' took * (glob) | debug.extensions: > extsetup for 'foobar' took * (glob) | ||||
debug.extensions: > all extsetup took * (glob) | |||||
debug.extensions: - executing remaining aftercallbacks | debug.extensions: - executing remaining aftercallbacks | ||||
debug.extensions: > remaining aftercallbacks completed in * (glob) | debug.extensions: > remaining aftercallbacks completed in * (glob) | ||||
debug.extensions: - loading extension registration objects | debug.extensions: - loading extension registration objects | ||||
debug.extensions: > extension registration object loading took * (glob) | debug.extensions: > extension registration object loading took * (glob) | ||||
debug.extensions: extension loading complete | debug.extensions: extension loading complete | ||||
debug.extensions: loading additional extensions | debug.extensions: loading additional extensions | ||||
debug.extensions: - processing 1 entries | debug.extensions: - processing 1 entries | ||||
debug.extensions: > loaded 0 extensions, total time * (glob) | debug.extensions: > loaded 0 extensions, total time * (glob) | ||||
debug.extensions: - loading configtable attributes | debug.extensions: - loading configtable attributes | ||||
debug.extensions: - executing uisetup hooks | debug.extensions: - executing uisetup hooks | ||||
debug.extensions: > all uisetup took * (glob) | debug.extensions: > all uisetup took * (glob) | ||||
debug.extensions: - executing extsetup hooks | debug.extensions: - executing extsetup hooks | ||||
debug.extensions: > all extsetup took * (glob) | |||||
debug.extensions: - executing remaining aftercallbacks | debug.extensions: - executing remaining aftercallbacks | ||||
debug.extensions: > remaining aftercallbacks completed in * (glob) | debug.extensions: > remaining aftercallbacks completed in * (glob) | ||||
debug.extensions: - loading extension registration objects | debug.extensions: - loading extension registration objects | ||||
debug.extensions: > extension registration object loading took * (glob) | debug.extensions: > extension registration object loading took * (glob) | ||||
debug.extensions: extension loading complete | debug.extensions: extension loading complete | ||||
debug.extensions: - executing reposetup hooks | debug.extensions: - executing reposetup hooks | ||||
debug.extensions: - running reposetup for foobar | debug.extensions: - running reposetup for foobar | ||||
reposetup called for a | reposetup called for a | ||||
ui == repo.ui | ui == repo.ui | ||||
debug.extensions: > reposetup for 'foobar' took * (glob) | debug.extensions: > reposetup for 'foobar' took * (glob) | ||||
Foo | Foo | ||||
$ cd .. | $ cd .. | ||||
$ echo 'foobar = !' >> $HGRCPATH | $ echo 'foobar = !' >> $HGRCPATH |