changeset 41094:d9b6b9ed96d8

vfs: add a `_auditpath` to abstract vfs We are about to make `rename` audit path. Since rename lives in the `abstractvfs` layer, we need it to be aware of auditing to some extent. The default implementation is no-op because multiple existing vfs are not using auditing at all right now (eg: fncachevfs).
author Boris Feld <boris.feld@octobus.net>
date Wed, 26 Dec 2018 13:44:23 +0100
parents c8006a25b845
children 9e593db5f1a1
files mercurial/vfs.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/vfs.py	Sun Jul 02 04:51:03 2017 +0200
+++ b/mercurial/vfs.py	Wed Dec 26 13:44:23 2018 +0100
@@ -46,6 +46,9 @@
         '''Prevent instantiation; don't call this from subclasses.'''
         raise NotImplementedError('attempted instantiating ' + str(type(self)))
 
+    def _auditpath(self, path, mode):
+        pass
+
     def tryread(self, path):
         '''gracefully return an empty string for missing files'''
         try: