Skip to content
Snippets Groups Projects
Commit f8a86ea7521b authored by Jesse Glick's avatar Jesse Glick
Browse files

When failing to load an extension, show where Hg tried to load it from.

parent 3a75fcc96dac
No related branches found
No related tags found
No related merge requests found
......@@ -78,8 +78,12 @@
except (util.SignalInterrupt, KeyboardInterrupt):
raise
except Exception, inst:
ui.warn(_("*** failed to import extension %s: %s\n") %
(name, inst))
if path:
ui.warn(_("*** failed to import extension %s from %s: %s\n")
% (name, path, inst))
else:
ui.warn(_("*** failed to import extension %s: %s\n")
% (name, inst))
if ui.print_exc():
return 1
......@@ -7,4 +7,5 @@
echo "gpg =" >> $HGRCPATH
echo "hgext.gpg =" >> $HGRCPATH
echo "badext = $abspath" >> $HGRCPATH
echo "badext2 =" >> $HGRCPATH
......@@ -10,2 +11,3 @@
hg -q help help
hg -q help help 2>&1 | python -c \
"import sys; sys.stdout.write(sys.stdin.read().replace('$abspath', '.../badext.py'))"
*** failed to import extension badext: bit bucket overflow
*** failed to import extension badext from .../badext.py: bit bucket overflow
*** failed to import extension badext2: No module named badext2
hg help [COMMAND]
show help for a command, extension, or list of commands
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment