Mercurial > hg
comparison tests/test-bad-extension.t @ 38798:d58958676b3c
extensions: add detailed loading information
This lets you track down what exactly is happening during extension loading,
and how long various steps took.
author | Martijn Pieters <mj@zopatista.com> |
---|---|
date | Wed, 01 Aug 2018 16:06:53 +0200 |
parents | fcb517ff9562 |
children | f2e645dc6a67 |
comparison
equal
deleted
inserted
replaced
38797:8751d1e2a7ff | 38798:d58958676b3c |
---|---|
75 show traceback for ImportError of hgext.name if devel.debug.extensions is set | 75 show traceback for ImportError of hgext.name if devel.debug.extensions is set |
76 | 76 |
77 $ (hg help help --traceback --debug --config devel.debug.extensions=yes 2>&1) \ | 77 $ (hg help help --traceback --debug --config devel.debug.extensions=yes 2>&1) \ |
78 > | grep -v '^ ' \ | 78 > | grep -v '^ ' \ |
79 > | egrep 'extension..[^p]|^Exception|Traceback|ImportError|not import' | 79 > | egrep 'extension..[^p]|^Exception|Traceback|ImportError|not import' |
80 debug.extensions: loading extensions | |
81 debug.extensions: - processing 5 entries | |
82 debug.extensions: - loading extension: 'gpg' | |
83 debug.extensions: > 'gpg' extension loaded in * (glob) | |
84 debug.extensions: - validating extension tables: 'gpg' | |
85 debug.extensions: - invoking registered callbacks: 'gpg' | |
86 debug.extensions: > callbacks completed in * (glob) | |
87 debug.extensions: - loading extension: 'badext' | |
80 *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow | 88 *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow |
81 Traceback (most recent call last): | 89 Traceback (most recent call last): |
82 Exception: bit bucket overflow | 90 Exception: bit bucket overflow |
83 could not import hgext.badext2 (No module named *badext2): trying hgext3rd.badext2 (glob) | 91 debug.extensions: - loading extension: 'baddocext' |
92 debug.extensions: > 'baddocext' extension loaded in * (glob) | |
93 debug.extensions: - validating extension tables: 'baddocext' | |
94 debug.extensions: - invoking registered callbacks: 'baddocext' | |
95 debug.extensions: > callbacks completed in * (glob) | |
96 debug.extensions: - loading extension: 'badext2' | |
97 debug.extensions: - could not import hgext.badext2 (No module named badext2): trying hgext3rd.badext2 | |
84 Traceback (most recent call last): | 98 Traceback (most recent call last): |
85 ImportError: No module named *badext2 (glob) | 99 ImportError: No module named *badext2 (glob) |
86 could not import hgext3rd.badext2 (No module named *badext2): trying badext2 (glob) | 100 debug.extensions: - could not import hgext3rd.badext2 (No module named badext2): trying badext2 |
87 Traceback (most recent call last): | 101 Traceback (most recent call last): |
88 ImportError: No module named *badext2 (glob) | 102 ImportError: No module named *badext2 (glob) |
89 *** failed to import extension badext2: No module named badext2 | 103 *** failed to import extension badext2: No module named badext2 |
90 Traceback (most recent call last): | 104 Traceback (most recent call last): |
91 ImportError: No module named badext2 | 105 ImportError: No module named badext2 |
106 debug.extensions: > loaded 2 extensions, total time * (glob) | |
107 debug.extensions: - loading configtable attributes | |
108 debug.extensions: - executing uisetup hooks | |
109 debug.extensions: - running uisetup for 'gpg' | |
110 debug.extensions: > uisetup for 'gpg' took * (glob) | |
111 debug.extensions: - running uisetup for 'baddocext' | |
112 debug.extensions: > uisetup for 'baddocext' took * (glob) | |
113 debug.extensions: - executing extsetup hooks | |
114 debug.extensions: - running extsetup for 'gpg' | |
115 debug.extensions: > extsetup for 'gpg' took * (glob) | |
116 debug.extensions: - running extsetup for 'baddocext' | |
117 debug.extensions: > extsetup for 'baddocext' took * (glob) | |
118 debug.extensions: - executing remaining aftercallbacks | |
119 debug.extensions: > remaining aftercallbacks completed in * (glob) | |
120 debug.extensions: - loading extension registration objects | |
121 debug.extensions: > extension registration object loading took * (glob) | |
122 debug.extensions: extension loading complete | |
92 | 123 |
93 confirm that there's no crash when an extension's documentation is bad | 124 confirm that there's no crash when an extension's documentation is bad |
94 | 125 |
95 $ hg help --keyword baddocext | 126 $ hg help --keyword baddocext |
96 *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow | 127 *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow |