Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7, 0.7.1, and 0.7.2

hgtk: add --debugger global argument

This will allow us to better debug problems in the binary
installer. Fixes #42

Changeset 75c4dd997c9a

Parent bb37ae30b808

by Steve Borho

Changes to one file · Browse files at 75c4dd997c9a Showing diff from parent bb37ae30b808 Diff from another changeset...

Change 1 of 3 Show Entire File contrib/​hgtk Stacked
 
22
23
24
 
25
26
27
 
45
46
47
48
 
 
 
 
 
 
 
 
 
49
50
51
 
490
491
492
 
493
494
495
 
22
23
24
25
26
27
28
 
46
47
48
 
49
50
51
52
53
54
55
56
57
58
59
60
 
499
500
501
502
503
504
505
@@ -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 = {