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).
--- 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: