Mercurial > hg
comparison mercurial/localrepo.py @ 33538:54b36d3ff7f6
cachevfs: add a devel warning for cache access though 'vfs'
This will help third party extensions to migrate to the new 'cachevfs'.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sat, 15 Jul 2017 23:05:15 +0200 |
parents | 4133c0b0fcd7 |
children | 460733327640 |
comparison
equal
deleted
inserted
replaced
33537:709dde1c5dd5 | 33538:54b36d3ff7f6 |
---|---|
485 if mode in (None, 'r', 'rb'): | 485 if mode in (None, 'r', 'rb'): |
486 return | 486 return |
487 if path.startswith(repo.path): | 487 if path.startswith(repo.path): |
488 # truncate name relative to the repository (.hg) | 488 # truncate name relative to the repository (.hg) |
489 path = path[len(repo.path) + 1:] | 489 path = path[len(repo.path) + 1:] |
490 if path.startswith('cache/'): | |
491 msg = 'accessing cache with vfs instead of cachevfs: "%s"' | |
492 repo.ui.develwarn(msg % path, stacklevel=2, config="cache-vfs") | |
490 if path.startswith('journal.'): | 493 if path.startswith('journal.'): |
491 # journal is covered by 'lock' | 494 # journal is covered by 'lock' |
492 if repo._currentlock(repo._lockref) is None: | 495 if repo._currentlock(repo._lockref) is None: |
493 repo.ui.develwarn('write with no lock: "%s"' % path, | 496 repo.ui.develwarn('write with no lock: "%s"' % path, |
494 stacklevel=2, config='check-locks') | 497 stacklevel=2, config='check-locks') |