ui: install logger that sends debug.extensions messages to stderr
This will replace the custom log function introduced at
d58958676b3c
"extensions: add detailed loading information."
blackbox: resurrect recursion guard
If I added ui.log() to hg.repository() function, test-merge-subrepos.t
exploded. The problem is that the blackbox may create new repository instance
while logging is active, and the created repository owns its new ui derived
from the baseui, not from the ui which is processing the active logging.
I tried to work around the issue in ui.log(), but that turned out to be not
easy. We shouldn't globally lock the ui.log() since there may be more than
one active repo/ui instances in threaded environment. We could store the
logging state in thread-local storage, but that seems unnecessarily complex.
So this patch reintroduces the _inlog flag to per-repository logger instances.
tests: filter out uninteresting log events
This helps adding more log()s without updating the tests.
context: error out if basefilectx.cmp() is called without self._filenode
The base implementation can't handle such cases because the filelog has no
knowledge about the working directory.
Loading self._filenode should have no extra cost since self.size() would
load it anyway.
context: collapse complex condition to see if filelog have to be compared
It's hard to read. I'd rather make the return statement duplicated.
worker: do not swallow exception occurred in main process
Before, SystemExit(255) would be most likely raised since the worker processes
were terminated by the main process and the status would be set to 255 in
response. We should instead re-raise the exception occurred first. It's pretty
hard to debug problems like the issue 6035 with no traceback.
run-tests: fix permission to clean up unreadable directories
I found many hgtests.* directories left in $TMPDIR, which couldn't be deleted
because test-ssh-repoerror.t created some directories with a-rx mode.