On Mon, 31 Dec 2018 18:37:29 +0100, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.f...@octobus.net>
> # Date 1545828263 -3600
> #      Wed Dec 26 13:44:23 2018 +0100
> # Node ID 6528ebfbd28f8fc3669257404eaa4b0aa2c2a2c8
> # Parent  5479d748f59531f6669290e092a12920cbcc8349
> # EXP-Topic vfs.audit-rename
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
> 6528ebfbd28f
> vfs: add a `_auditpath` to abstract vfs

Queued, thanks.

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

Yep. I really don't understand how these vfs classes are designed. proxyvfs 
might
have to forward _auditpath() to self.vfs.

> @@ -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

It's probably safer to raise NotImplementedError to catch typos.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to