[PATCH 1 of 7] vfs: use propertycache for open

Jun Wu quark at fb.com
Fri Aug 5 12:01:00 EDT 2016


Ahh, it's trickier than I thought. Thanks for pointing this out!

Excerpts from Yuya Nishihara's message of 2016-08-06 00:53:19 +0900:
> On Fri, 5 Aug 2016 15:26:48 +0100, Jun Wu wrote:
> > I don't think this is correct, as the filesystem is mutable. Consider:
> > 
> >   vfs.open(path)
> >   os.unlink(path)
> >   vfs.open(path) # <= Wrong result using propertycache
> 
> It just caches "open" function. Basically it is open = __call__, but __call__
> is provided by a sub class. I don't know which is the canonical form.


More information about the Mercurial-devel mailing list