diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -423,6 +423,8 @@ class localrepository(object): self.svfs = self.store.vfs self.sjoin = self.store.join self.vfs.createmode = self.store.createmode + self.cachevfs = vfsmod.vfs(self.vfs.join('cache')) + self.cachevfs.createmode = self.store.createmode if (self.ui.configbool('devel', 'all-warnings') or self.ui.configbool('devel', 'check-locks')): if util.safehasattr(self.svfs, 'vfs'): # this is filtervfs diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py +++ b/mercurial/statichttprepo.py @@ -124,6 +124,7 @@ class statichttprepository(localrepo.loc vfsclass = build_opener(ui, authinfo) self.vfs = vfsclass(self.path) + self.cachevfs = vfsclass(self.vfs.join('cache')) self._phasedefaults = [] self.names = namespaces.namespaces()