dispatch: disable demandimport when invoking the debugger
authorJordi Gutiérrez Hermoso <jordigh@octave.org>
Thu, 10 Sep 2015 09:30:10 -0400
changeset 26216 e86d12404d69
parent 26215 72aad184f061
child 26217 0d0a0837895d
dispatch: disable demandimport when invoking the debugger Turns out that demandimport confuses pudb, which does some pretty complicated imports. I think it's reasonable to disable demandimport here.
mercurial/dispatch.py
--- a/mercurial/dispatch.py	Wed Sep 09 14:43:45 2015 -0700
+++ b/mercurial/dispatch.py	Thu Sep 10 09:30:10 2015 -0400
@@ -181,8 +181,8 @@
                     debugtrace[debugger] == debugtrace['pdb']):
                     ui.warn(_("%s debugger specified "
                               "but its module was not found\n") % debugger)
-
-                debugtrace[debugger]()
+                with demandimport.disabled():
+                    debugtrace[debugger]()
             try:
                 return _dispatch(req)
             finally: