diff mercurial/extensions.py @ 34845:78d9a7b7cdb6

extensions: always include traceback when extension setup fails I have spent a lot of time debugging extensions that failed to load because we don't include a traceback and I didn't realize I could get traceback for the extension failure with --traceback. Let's just turn them on by default, since it should be rare that the user sees these tracebacks anyway (and if they do, it's not so bad if the extra traceback pushes them a little harder to report the problem). Since we already had a test case with --traceback and one without, I just removed the one with the flag. Differential Revision: https://phab.mercurial-scm.org/D1164
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 17 Oct 2017 10:31:44 -0700
parents 4c5730c21523
children 646002338365
line wrap: on
line diff
--- a/mercurial/extensions.py	Tue Oct 17 10:25:32 2017 -0700
+++ b/mercurial/extensions.py	Tue Oct 17 10:31:44 2017 -0700
@@ -182,7 +182,7 @@
         try:
             uisetup(ui)
         except Exception as inst:
-            ui.traceback()
+            ui.traceback(force=True)
             msg = util.forcebytestr(inst)
             ui.warn(_("*** failed to set up extension %s: %s\n") % (name, msg))
             return False
@@ -203,7 +203,7 @@
                     raise
                 extsetup() # old extsetup with no ui argument
         except Exception as inst:
-            ui.traceback()
+            ui.traceback(force=True)
             msg = util.forcebytestr(inst)
             ui.warn(_("*** failed to set up extension %s: %s\n") % (name, msg))
             return False