fixed hg mess

This commit is contained in:
Massimo Di Pierro
2012-03-01 15:20:30 -06:00
parent d1bd4a7153
commit f274cfed6c
2 changed files with 20 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.5 (2012-03-01 14:08:23) stable
Version 1.99.5 (2012-03-01 15:20:14) stable
+19 -4
View File
@@ -98,7 +98,7 @@ def check_interaction(fn):
try:
if self.filename:
self.clear_interaction()
fn(self, *args, **kwargs)
return fn(self, *args, **kwargs)
finally:
interact_lock.release()
return check_fn
@@ -115,6 +115,7 @@ class WebDebugger(qdb.Frontend):
self.filename = None
self.lineno = None
self.exception_info = None
self.context = None
# redefine Frontend methods:
@@ -126,12 +127,13 @@ class WebDebugger(qdb.Frontend):
finally:
run_lock.release()
def interaction(self, filename, lineno, line):
def interaction(self, filename, lineno, line, **context):
# store current status
interact_lock.acquire()
try:
self.filename = filename
self.lineno = lineno
self.context = context
finally:
interact_lock.release()
@@ -160,8 +162,18 @@ class WebDebugger(qdb.Frontend):
def do_quit(self):
qdb.Frontend.do_quit(self)
def do_exec(self, statement):
interact_lock.acquire()
try:
# check to see if we're inside interaction
if self.filename:
# avoid spurious interaction notifications:
self.set_burst(2)
# execute the statement in the remote debugger:
return qdb.Frontend.do_exec(self, statement)
finally:
interact_lock.release()
# create the connection between threads:
parent_queue, child_queue = Queue.Queue(), Queue.Queue()
@@ -172,6 +184,9 @@ web_debugger = WebDebugger(front_conn) # frontend
qdb_debugger = qdb.Qdb(pipe=child_conn, redirect_stdio=False, skip=None) # backend
dbg = qdb_debugger
# enable getting context (stack, globals/locals) at interaction
qdb_debugger.set_params(dict(call_stack=True, environment=True))
import gluon.main
gluon.main.global_settings.debugging = True