With --debug-locks, print a message when we stop to wait on a lock.

Helps in seeing why a particular process might be stopped, and in detecting
potential reasons that parallelism might be reduced.
This commit is contained in:
Avery Pennarun 2010-12-10 04:31:22 -08:00
commit f70c028a8a
2 changed files with 19 additions and 5 deletions

View file

@ -34,13 +34,20 @@ def _cerr(s):
def _bwerr(s):
log_('redo: %s%s' % (vars.DEPTH, s))
def _cwarn(s):
log_('\x1b[33mredo: %s\x1b[1m%s\x1b[m' % (vars.DEPTH, s))
def _bwwarn(s):
log_('redo: %s%s' % (vars.DEPTH, s))
if os.isatty(2):
log = _clog
err = _cerr
warn = _cwarn
else:
log = _bwlog
err = _bwerr
warn = _bwwarn
def debug(s):