debugger: show traceback before entering pdb post-mortem
authorMads Kiilerich <mads@kiilerich.com>
Wed, 30 Jun 2010 17:20:42 +0200
changeset 11494 2347513f562a
parent 11493 cc4e2a7ca23f
child 11495 6ee107782018
debugger: show traceback before entering pdb post-mortem
mercurial/dispatch.py
--- a/mercurial/dispatch.py	Fri Jul 02 11:30:57 2010 +0200
+++ b/mercurial/dispatch.py	Wed Jun 30 17:20:42 2010 +0200
@@ -6,7 +6,7 @@
 # GNU General Public License version 2 or any later version.
 
 from i18n import _
-import os, sys, atexit, signal, pdb, socket, errno, shlex, time
+import os, sys, atexit, signal, pdb, socket, errno, shlex, time, traceback
 import util, commands, hg, fancyopts, extensions, hook, error
 import cmdutil, encoding
 import ui as uimod
@@ -57,6 +57,7 @@
         except:
             # enter the debugger when we hit an exception
             if '--debugger' in args:
+                traceback.print_exc()
                 pdb.post_mortem(sys.exc_info()[2])
             ui.traceback()
             raise