Show More
@@ -307,10 +307,12 b' def loadall(ui, whitelist=None):' | |||||
307 | except Exception as inst: |
|
307 | except Exception as inst: | |
308 | msg = stringutil.forcebytestr(inst) |
|
308 | msg = stringutil.forcebytestr(inst) | |
309 | if path: |
|
309 | if path: | |
310 |
error_msg = _( |
|
310 | error_msg = _( | |
|
311 | b'failed to import extension "%s" from %s: %s' | |||
|
312 | ) | |||
311 | error_msg %= (name, path, msg) |
|
313 | error_msg %= (name, path, msg) | |
312 | else: |
|
314 | else: | |
313 |
error_msg = _(b" |
|
315 | error_msg = _(b'failed to import extension "%s": %s') | |
314 | error_msg %= (name, msg) |
|
316 | error_msg %= (name, msg) | |
315 | ui.warn((b"*** %s\n") % error_msg) |
|
317 | ui.warn((b"*** %s\n") % error_msg) | |
316 | if isinstance(inst, error.Hint) and inst.hint: |
|
318 | if isinstance(inst, error.Hint) and inst.hint: |
@@ -52,16 +52,16 b' another bad extension' | |||||
52 | > EOF |
|
52 | > EOF | |
53 |
|
53 | |||
54 | $ hg -q help help 2>&1 |grep extension |
|
54 | $ hg -q help help 2>&1 |grep extension | |
55 | *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow |
|
55 | *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow | |
56 |
*** failed to import extension badext2: No module named |
|
56 | *** failed to import extension "badext2": No module named 'badext2' | |
57 |
|
57 | |||
58 | show traceback |
|
58 | show traceback | |
59 |
|
59 | |||
60 | $ hg -q help help --traceback 2>&1 | egrep ' extension|^Exception|Traceback|ImportError|ModuleNotFound' |
|
60 | $ hg -q help help --traceback 2>&1 | egrep ' extension|^Exception|Traceback|ImportError|ModuleNotFound' | |
61 | *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow |
|
61 | *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow | |
62 | Traceback (most recent call last): |
|
62 | Traceback (most recent call last): | |
63 | Exception: bit bucket overflow |
|
63 | Exception: bit bucket overflow | |
64 |
*** failed to import extension badext2: No module named |
|
64 | *** failed to import extension "badext2": No module named 'badext2' | |
65 | Traceback (most recent call last): |
|
65 | Traceback (most recent call last): | |
66 | ImportError: No module named badext2 (no-py3 !) |
|
66 | ImportError: No module named badext2 (no-py3 !) | |
67 | ImportError: No module named 'hgext.badext2' (py3 no-py36 !) |
|
67 | ImportError: No module named 'hgext.badext2' (py3 no-py36 !) | |
@@ -101,7 +101,7 b' show traceback for ImportError of hgext.' | |||||
101 | YYYY/MM/DD HH:MM:SS (PID)> - invoking registered callbacks: gpg |
|
101 | YYYY/MM/DD HH:MM:SS (PID)> - invoking registered callbacks: gpg | |
102 | YYYY/MM/DD HH:MM:SS (PID)> > callbacks completed in * (glob) |
|
102 | YYYY/MM/DD HH:MM:SS (PID)> > callbacks completed in * (glob) | |
103 | YYYY/MM/DD HH:MM:SS (PID)> - loading extension: badext |
|
103 | YYYY/MM/DD HH:MM:SS (PID)> - loading extension: badext | |
104 | *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow |
|
104 | *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow | |
105 | Traceback (most recent call last): |
|
105 | Traceback (most recent call last): | |
106 | Exception: bit bucket overflow |
|
106 | Exception: bit bucket overflow | |
107 | YYYY/MM/DD HH:MM:SS (PID)> - loading extension: baddocext |
|
107 | YYYY/MM/DD HH:MM:SS (PID)> - loading extension: baddocext | |
@@ -123,7 +123,7 b' show traceback for ImportError of hgext.' | |||||
123 | Traceback (most recent call last): (py3 !) |
|
123 | Traceback (most recent call last): (py3 !) | |
124 | ImportError: No module named 'hgext3rd.badext2' (py3 no-py36 !) |
|
124 | ImportError: No module named 'hgext3rd.badext2' (py3 no-py36 !) | |
125 | ModuleNotFoundError: No module named 'hgext3rd.badext2' (py36 !) |
|
125 | ModuleNotFoundError: No module named 'hgext3rd.badext2' (py36 !) | |
126 |
*** failed to import extension badext2: No module named |
|
126 | *** failed to import extension "badext2": No module named 'badext2' | |
127 | Traceback (most recent call last): |
|
127 | Traceback (most recent call last): | |
128 | ImportError: No module named 'hgext.badext2' (py3 no-py36 !) |
|
128 | ImportError: No module named 'hgext.badext2' (py3 no-py36 !) | |
129 | ModuleNotFoundError: No module named 'hgext.badext2' (py36 !) |
|
129 | ModuleNotFoundError: No module named 'hgext.badext2' (py36 !) | |
@@ -160,8 +160,8 b' show traceback for ImportError of hgext.' | |||||
160 | confirm that there's no crash when an extension's documentation is bad |
|
160 | confirm that there's no crash when an extension's documentation is bad | |
161 |
|
161 | |||
162 | $ hg help --keyword baddocext |
|
162 | $ hg help --keyword baddocext | |
163 | *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow |
|
163 | *** failed to import extension "badext" from $TESTTMP/badext.py: bit bucket overflow | |
164 |
*** failed to import extension badext2: No module named |
|
164 | *** failed to import extension "badext2": No module named 'badext2' | |
165 | Topics: |
|
165 | Topics: | |
166 |
|
166 | |||
167 | extensions Using Additional Features |
|
167 | extensions Using Additional Features |
@@ -84,7 +84,7 b" However, we can't prevent it from loadin" | |||||
84 | > raise Exception('bad') |
|
84 | > raise Exception('bad') | |
85 | > EOF |
|
85 | > EOF | |
86 | $ hg log -b '--config=extensions.bad=bad.py' default |
|
86 | $ hg log -b '--config=extensions.bad=bad.py' default | |
87 | *** failed to import extension bad from bad.py: bad |
|
87 | *** failed to import extension "bad" from bad.py: bad | |
88 | abort: option --config may not be abbreviated |
|
88 | abort: option --config may not be abbreviated | |
89 | [10] |
|
89 | [10] | |
90 |
|
90 |
@@ -649,7 +649,7 b" Python 3's lazy importer verifies module" | |||||
649 | module stub. Our custom lazy importer for Python 2 always returns a stub. |
|
649 | module stub. Our custom lazy importer for Python 2 always returns a stub. | |
650 |
|
650 | |||
651 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.checkrelativity=$TESTTMP/checkrelativity.py checkrelativity) || true |
|
651 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}; hg --config extensions.checkrelativity=$TESTTMP/checkrelativity.py checkrelativity) || true | |
652 |
*** failed to import extension checkrelativity from $TESTTMP/checkrelativity.py: No module named 'extlibroot.lsub1.lsub2.notexist' |
|
652 | *** failed to import extension "checkrelativity" from $TESTTMP/checkrelativity.py: No module named 'extlibroot.lsub1.lsub2.notexist' | |
653 | hg: unknown command 'checkrelativity' (py3 !) |
|
653 | hg: unknown command 'checkrelativity' (py3 !) | |
654 | (use 'hg help' for a list of commands) (py3 !) |
|
654 | (use 'hg help' for a list of commands) (py3 !) | |
655 |
|
655 | |||
@@ -1882,7 +1882,7 b' Prohibit registration of commands that d' | |||||
1882 | > EOF |
|
1882 | > EOF | |
1883 |
|
1883 | |||
1884 | $ hg deprecatedcmd > /dev/null |
|
1884 | $ hg deprecatedcmd > /dev/null | |
1885 | *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo |
|
1885 | *** failed to import extension "deprecatedcmd" from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo | |
1886 | *** (use @command decorator to register 'deprecatedcmd') |
|
1886 | *** (use @command decorator to register 'deprecatedcmd') | |
1887 | hg: unknown command 'deprecatedcmd' |
|
1887 | hg: unknown command 'deprecatedcmd' | |
1888 | (use 'hg help' for a list of commands) |
|
1888 | (use 'hg help' for a list of commands) | |
@@ -1891,7 +1891,7 b' Prohibit registration of commands that d' | |||||
1891 | the extension shouldn't be loaded at all so the mq works: |
|
1891 | the extension shouldn't be loaded at all so the mq works: | |
1892 |
|
1892 | |||
1893 | $ hg qseries --config extensions.mq= > /dev/null |
|
1893 | $ hg qseries --config extensions.mq= > /dev/null | |
1894 | *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo |
|
1894 | *** failed to import extension "deprecatedcmd" from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo | |
1895 | *** (use @command decorator to register 'deprecatedcmd') |
|
1895 | *** (use @command decorator to register 'deprecatedcmd') | |
1896 |
|
1896 | |||
1897 | $ cd .. |
|
1897 | $ cd .. | |
@@ -1939,7 +1939,7 b' Prohibit the use of unicode strings as t' | |||||
1939 | > test_unicode_default_value = $TESTTMP/test_unicode_default_value.py |
|
1939 | > test_unicode_default_value = $TESTTMP/test_unicode_default_value.py | |
1940 | > EOF |
|
1940 | > EOF | |
1941 | $ hg -R $TESTTMP/opt-unicode-default dummy |
|
1941 | $ hg -R $TESTTMP/opt-unicode-default dummy | |
1942 |
*** failed to import extension test_unicode_default_value from $TESTTMP/test_unicode_default_value.py: unicode |
|
1942 | *** failed to import extension "test_unicode_default_value" from $TESTTMP/test_unicode_default_value.py: unicode 'value' found in cmdtable.dummy | |
1943 | *** (use b'' to make it byte string) |
|
1943 | *** (use b'' to make it byte string) | |
1944 | hg: unknown command 'dummy' |
|
1944 | hg: unknown command 'dummy' | |
1945 | (did you mean summary?) |
|
1945 | (did you mean summary?) |
@@ -41,7 +41,7 b' common commands affecting largefile.' | |||||
41 | > EOF |
|
41 | > EOF | |
42 |
|
42 | |||
43 | $ hg config extensions |
|
43 | $ hg config extensions | |
44 | \*\*\* failed to import extension largefiles from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob) |
|
44 | \*\*\* failed to import extension "largefiles" from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob) | |
45 | abort: repository requires features unknown to this Mercurial: largefiles |
|
45 | abort: repository requires features unknown to this Mercurial: largefiles | |
46 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
46 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
47 | [255] |
|
47 | [255] |
@@ -40,7 +40,7 b'' | |||||
40 | > EOF |
|
40 | > EOF | |
41 |
|
41 | |||
42 | $ hg config extensions |
|
42 | $ hg config extensions | |
43 | \*\*\* failed to import extension lfs from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob) |
|
43 | \*\*\* failed to import extension "lfs" from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob) | |
44 | abort: repository requires features unknown to this Mercurial: lfs |
|
44 | abort: repository requires features unknown to this Mercurial: lfs | |
45 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
45 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
46 | [255] |
|
46 | [255] |
@@ -117,7 +117,7 b' help (bad mq)' | |||||
117 |
|
117 | |||
118 | $ echo "mq=nonexistent" >> $HGRCPATH |
|
118 | $ echo "mq=nonexistent" >> $HGRCPATH | |
119 | $ hg help qrecord |
|
119 | $ hg help qrecord | |
120 | *** failed to import extension mq from nonexistent: [Errno *] * (glob) |
|
120 | *** failed to import extension "mq" from nonexistent: [Errno *] * (glob) | |
121 | hg qrecord [OPTION]... PATCH [FILE]... |
|
121 | hg qrecord [OPTION]... PATCH [FILE]... | |
122 |
|
122 | |||
123 | interactively record a new patch |
|
123 | interactively record a new patch |
@@ -1601,7 +1601,7 b' loading it' | |||||
1601 | > EOF |
|
1601 | > EOF | |
1602 |
|
1602 | |||
1603 | $ hg debugrevspec "custom1()" |
|
1603 | $ hg debugrevspec "custom1()" | |
1604 | *** failed to import extension custompredicate from $TESTTMP/custompredicate.py: intentional failure of loading extension |
|
1604 | *** failed to import extension "custompredicate" from $TESTTMP/custompredicate.py: intentional failure of loading extension | |
1605 | hg: parse error: unknown identifier: custom1 |
|
1605 | hg: parse error: unknown identifier: custom1 | |
1606 | [10] |
|
1606 | [10] | |
1607 |
|
1607 |
General Comments 0
You need to be logged in to leave comments.
Login now