Mercurial > hg
comparison mercurial/localrepo.py @ 40751:41b6245c3fc4
vfs: treat 'undo.' file the same as 'journal.' file
They are the same kind of file, they are protected by the store lock, but
directly lives inside the '.hg' directory.
No warnings were ever raised about them because `vfs.rename` is not audited.
Something we are trying to change.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 22 Nov 2018 18:44:07 +0100 |
parents | 300f8564220f |
children | 34f15db81cf0 |
comparison
equal
deleted
inserted
replaced
40750:45a0047c0ebc | 40751:41b6245c3fc4 |
---|---|
1029 # truncate name relative to the repository (.hg) | 1029 # truncate name relative to the repository (.hg) |
1030 path = path[len(repo.path) + 1:] | 1030 path = path[len(repo.path) + 1:] |
1031 if path.startswith('cache/'): | 1031 if path.startswith('cache/'): |
1032 msg = 'accessing cache with vfs instead of cachevfs: "%s"' | 1032 msg = 'accessing cache with vfs instead of cachevfs: "%s"' |
1033 repo.ui.develwarn(msg % path, stacklevel=2, config="cache-vfs") | 1033 repo.ui.develwarn(msg % path, stacklevel=2, config="cache-vfs") |
1034 if path.startswith('journal.'): | 1034 if path.startswith('journal.') or path.startswith('undo.'): |
1035 # journal is covered by 'lock' | 1035 # journal is covered by 'lock' |
1036 if repo._currentlock(repo._lockref) is None: | 1036 if repo._currentlock(repo._lockref) is None: |
1037 repo.ui.develwarn('write with no lock: "%s"' % path, | 1037 repo.ui.develwarn('write with no lock: "%s"' % path, |
1038 stacklevel=2, config='check-locks') | 1038 stacklevel=2, config='check-locks') |
1039 elif repo._currentlock(repo._wlockref) is None: | 1039 elif repo._currentlock(repo._wlockref) is None: |