# HG changeset patch # User Boris Feld # Date 2018-12-26 12:44:23 # Node ID d9b6b9ed96d832891bfbfd8b2267a411965ed9a8 # Parent c8006a25b845e2f0705369ed191d1db6adb2d7cd 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). diff --git a/mercurial/vfs.py b/mercurial/vfs.py --- a/mercurial/vfs.py +++ b/mercurial/vfs.py @@ -46,6 +46,9 @@ class abstractvfs(object): '''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: