##// END OF EJS Templates
When failing to load an extension, show where Hg tried to load it from.
Jesse Glick -
r6204:f8a86ea7 default
parent child Browse files
Show More
@@ -78,8 +78,12 b' def loadall(ui):'
78 except (util.SignalInterrupt, KeyboardInterrupt):
78 except (util.SignalInterrupt, KeyboardInterrupt):
79 raise
79 raise
80 except Exception, inst:
80 except Exception, inst:
81 ui.warn(_("*** failed to import extension %s: %s\n") %
81 if path:
82 (name, inst))
82 ui.warn(_("*** failed to import extension %s from %s: %s\n")
83 % (name, path, inst))
84 else:
85 ui.warn(_("*** failed to import extension %s: %s\n")
86 % (name, inst))
83 if ui.print_exc():
87 if ui.print_exc():
84 return 1
88 return 1
85
89
@@ -7,5 +7,7 b" echo '[extensions]' >> $HGRCPATH"
7 echo "gpg =" >> $HGRCPATH
7 echo "gpg =" >> $HGRCPATH
8 echo "hgext.gpg =" >> $HGRCPATH
8 echo "hgext.gpg =" >> $HGRCPATH
9 echo "badext = $abspath" >> $HGRCPATH
9 echo "badext = $abspath" >> $HGRCPATH
10 echo "badext2 =" >> $HGRCPATH
10
11
11 hg -q help help
12 hg -q help help 2>&1 | python -c \
13 "import sys; sys.stdout.write(sys.stdin.read().replace('$abspath', '.../badext.py'))"
@@ -1,4 +1,5 b''
1 *** failed to import extension badext: bit bucket overflow
1 *** failed to import extension badext from .../badext.py: bit bucket overflow
2 *** failed to import extension badext2: No module named badext2
2 hg help [COMMAND]
3 hg help [COMMAND]
3
4
4 show help for a command, extension, or list of commands
5 show help for a command, extension, or list of commands
General Comments 0
You need to be logged in to leave comments. Login now