[Updated] D8666: locks: expect repo lock, not wlock, when writing to .hg/strip-backup/

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Jun 29 10:33:24 UTC 2020


Closed by commit rHG27f24dd2a45d: locks: expect repo lock, not wlock, when writing to .hg/strip-backup/ (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8666?vs=21716&id=21729

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8666/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8666

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1235,8 +1235,9 @@
             if path.startswith(b'cache/'):
                 msg = b'accessing cache with vfs instead of cachevfs: "%s"'
                 repo.ui.develwarn(msg % path, stacklevel=3, config=b"cache-vfs")
-            if path.startswith(b'journal.') or path.startswith(b'undo.'):
-                # journal is covered by 'lock'
+            # path prefixes covered by 'lock'
+            vfs_path_prefixes = (b'journal.', b'undo.', b'strip-backup/')
+            if any(path.startswith(prefix) for prefix in vfs_path_prefixes):
                 if repo._currentlock(repo._lockref) is None:
                     repo.ui.develwarn(
                         b'write with no lock: "%s"' % path,



To: martinvonz, #hg-reviewers, durin42, pulkit
Cc: durin42, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200629/d5f4b497/attachment-0002.html>


More information about the Mercurial-patches mailing list