Changeset 75c4dd997c9a…
Parent bb37ae30b808…
by
Changes to one file · Browse files at 75c4dd997c9a Showing diff from parent bb37ae30b808 Diff from another changeset...
@@ -22,6 +22,7 @@ from mercurial import demandimport; demandimport.enable()
from mercurial.i18n import _
from mercurial import hg, util, fancyopts, commands, cmdutil
+import pdb
import mercurial.ui as _ui
try:
@@ -45,7 +46,15 @@ except util.Abort, inst:
sys.stderr.write(_("abort: %s\n") % inst)
return -1
- return _runcatch(u, args)
+ if '--debugger' in args:
+ pdb.set_trace()
+ try:
+ return _runcatch(u, args)
+ except:
+ if '--debugger' in args:
+ pdb.post_mortem(sys.exc_info()[2])
+ ui.print_exc()
+ raise
def _parse(ui, args):
options = {}
@@ -490,6 +499,7 @@ _('repository root directory or symbolic path name')),
('v', 'verbose', None, _('enable additional output')),
('h', 'help', None, _('display help and exit')),
+ ('', 'debugger', None, _('start debugger')),
]
table = {
|
Loading...