vfs: add a `_auditpath` to abstract vfs
authorBoris Feld <boris.feld@octobus.net>
Wed, 26 Dec 2018 13:44:23 +0100
changeset 41091 d9b6b9ed96d8
parent 41090 c8006a25b845
child 41092 9e593db5f1a1
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).
mercurial/vfs.py
--- 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: