Patchwork [3,of,3] dispatch: include chained exceptions in printed tracebacks when using --debugger

login
register
mail settings
Submitter Matt Harbison
Date Feb. 7, 2013, 5:42 a.m.
Message ID <3d7b4fcbf3429181b531.1360215764@Envy>
Download mbox | patch
Permalink /patch/822/
State Superseded
Headers show

Comments

Matt Harbison - Feb. 7, 2013, 5:42 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1360211210 18000
# Branch stable
# Node ID 3d7b4fcbf3429181b531a42bf899c2f6d647d37b
# Parent  2c31ee8efad0e21d79d7caba2e306e918aa7798f
dispatch: include chained exceptions in printed tracebacks when using --debugger

Patch

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -91,7 +91,8 @@ 
         except: # re-raises
             # enter the debugger when we hit an exception
             if '--debugger' in req.args:
-                traceback.print_exc()
+                ui.tracebackflag=True
+                ui.traceback()
                 pdb.post_mortem(sys.exc_info()[2])
             ui.traceback()
             raise