--- a/mercurial/dispatch.py Thu Jul 01 19:13:23 2010 -0500
+++ b/mercurial/dispatch.py Fri Jul 02 11:41:43 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
@@ -49,6 +49,8 @@
try:
# enter the debugger before command execution
if '--debugger' in args:
+ ui.warn(_("entering debugger - "
+ "type c to continue starting hg or h for help\n"))
pdb.set_trace()
try:
return _dispatch(ui, args)
@@ -57,6 +59,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