Patchwork [1,of,6] vfs: treat 'undo.' file the same as 'journal.' file

mail settings
Submitter Boris Feld
Date Nov. 26, 2018, 6:22 p.m.
Message ID <5bcdd426a817c333ca30.1543256563@localhost.localdomain>
Download mbox | patch
Permalink /patch/36776/
State Accepted
Headers show


Boris Feld - Nov. 26, 2018, 6:22 p.m.
# HG changeset patch
# User Boris Feld <>
# Date 1542908647 -3600
#      Thu Nov 22 18:44:07 2018 +0100
# Node ID 5bcdd426a817c333ca30dac9a02ec100f962155e
# Parent  dba590f27c7abacbd7e9b27f3e06822bb0b339cb
# EXP-Topic vfs.audit-rename
# Available At
#              hg pull -r 5bcdd426a817
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.


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -1030,7 +1030,7 @@  class localrepository(object):
             if path.startswith('cache/'):
                 msg = 'accessing cache with vfs instead of cachevfs: "%s"'
                 repo.ui.develwarn(msg % path, stacklevel=2, config="cache-vfs")
-            if path.startswith('journal.'):
+            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,