this patch is working for me. it would be nice to use --traceback instead. but
that parse call happens after that extension init stuffs, so i cannot. maybe
even though this is ugly, it is ok for extension writers.
diff -r 67779d34cb52 mercurial/commands.py
--- a/mercurial/commands.py Sat Oct 15 15:49:05 2005 -0700
+++ b/mercurial/commands.py Thu Oct 20 21:52:33 2005 -0700
@@ -2063,6 +2063,8 @@
mod = imp.load_source(x[0], x[1])
except:
u.warn("*** failed to import extension %s\n" % x[1])
+ if os.getenv('HGEXT_TRACEBACK'):
+ traceback.print_exc()
continue
else:
def importh(name):
@@ -2074,7 +2076,9 @@
try:
mod = importh(x[0])
except:
- u.warn("failed to import extension %s\n" % x[0])
+ u.warn("*** failed to import extension %s\n" % x[0])
+ if os.getenv('HGEXT_TRACEBACK'):
+ traceback.print_exc()
continue
external.append(mod)
|