Mercurial > hg-stable
changeset 33532:d645fdfb749f
vfsward: register 'write with no lock' warnings as 'check-locks' config
Update 'write with no lock' warnings in order to be better controlled by the
config. We reuse the option used for lock order for these other lock related
message.
The message can now be disabled using 'devel.check-locks = no' (in addition to
the usual 'devel.all-warnings = no').
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sat, 15 Jul 2017 22:40:51 +0200 |
parents | 9cbbf9118c6c |
children | 4133c0b0fcd7 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sun Jul 16 17:38:39 2017 +0900 +++ b/mercurial/localrepo.py Sat Jul 15 22:40:51 2017 +0200 @@ -489,7 +489,7 @@ # journal is covered by 'lock' if repo._currentlock(repo._lockref) is None: repo.ui.develwarn('write with no lock: "%s"' % path, - stacklevel=2) + stacklevel=2, config='check-locks') elif repo._currentlock(repo._wlockref) is None: # rest of vfs files are covered by 'wlock' # @@ -498,7 +498,7 @@ if path.startswith(prefix): return repo.ui.develwarn('write with no wlock: "%s"' % path, - stacklevel=2) + stacklevel=2, config='check-locks') return ret return checkvfs