##// END OF EJS Templates
dispatch: disable demandimport for the --debugger option...
Jordi Gutiérrez Hermoso -
r25329:101e8412 default
parent child Browse files
Show More
@@ -11,6 +11,7 b' import difflib'
11 import util, commands, hg, fancyopts, extensions, hook, error
11 import util, commands, hg, fancyopts, extensions, hook, error
12 import cmdutil, encoding
12 import cmdutil, encoding
13 import ui as uimod
13 import ui as uimod
14 import demandimport
14
15
15 class request(object):
16 class request(object):
16 def __init__(self, args, ui=None, repo=None, fin=None, fout=None,
17 def __init__(self, args, ui=None, repo=None, fin=None, fout=None,
@@ -137,10 +138,11 b' def _runcatch(req):'
137 # This import can be slow for fancy debuggers, so only
138 # This import can be slow for fancy debuggers, so only
138 # do it when absolutely necessary, i.e. when actual
139 # do it when absolutely necessary, i.e. when actual
139 # debugging has been requested
140 # debugging has been requested
140 try:
141 with demandimport.deactivated():
141 debugmod = __import__(debugger)
142 try:
142 except ImportError:
143 debugmod = __import__(debugger)
143 pass # Leave debugmod = pdb
144 except ImportError:
145 pass # Leave debugmod = pdb
144
146
145 debugtrace[debugger] = debugmod.set_trace
147 debugtrace[debugger] = debugmod.set_trace
146 debugmortem[debugger] = debugmod.post_mortem
148 debugmortem[debugger] = debugmod.post_mortem
General Comments 0
You need to be logged in to leave comments. Login now