Mercurial > hg
comparison COPYING @ 40993:49d48489a16b
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.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 15 Dec 2018 19:05:42 +0900 |
parents | 8c8b55733cbd |
children |
comparison
equal
deleted
inserted
replaced
40992:1de3364320af | 40993:49d48489a16b |
---|