Mercurial > hg
diff mercurial/localrepo.py @ 40754:34f15db81cf0
vfs: extract the audit path logic into a submethod
This will make it possible to apply it in more cases.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sun, 02 Jul 2017 04:06:24 +0200 |
parents | 41b6245c3fc4 |
children | 875d2af8cb4e |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Nov 22 20:01:28 2018 +0100 +++ b/mercurial/localrepo.py Sun Jul 02 04:06:24 2017 +0200 @@ -1030,12 +1030,12 @@ path = path[len(repo.path) + 1:] if path.startswith('cache/'): msg = 'accessing cache with vfs instead of cachevfs: "%s"' - repo.ui.develwarn(msg % path, stacklevel=2, config="cache-vfs") + repo.ui.develwarn(msg % path, stacklevel=3, config="cache-vfs") if path.startswith('journal.') or path.startswith('undo.'): # journal is covered by 'lock' if repo._currentlock(repo._lockref) is None: repo.ui.develwarn('write with no lock: "%s"' % path, - stacklevel=2, config='check-locks') + stacklevel=3, config='check-locks') elif repo._currentlock(repo._wlockref) is None: # rest of vfs files are covered by 'wlock' # @@ -1044,7 +1044,7 @@ if path.startswith(prefix): return repo.ui.develwarn('write with no wlock: "%s"' % path, - stacklevel=2, config='check-locks') + stacklevel=3, config='check-locks') return ret return checkvfs @@ -1063,7 +1063,7 @@ path = path[len(repo.sharedpath) + 1:] if repo._currentlock(repo._lockref) is None: repo.ui.develwarn('write with no lock: "%s"' % path, - stacklevel=3) + stacklevel=4) return ret return checksvfs