mercurial/localrepo.py
changeset 33737 02a745c20121
parent 33706 01a1c4e66816
parent 33649 377e8ddaebef
child 33803 707750e5310b
equal deleted inserted replaced
33736:86aca74a063b 33737:02a745c20121
   332         self.origroot = path
   332         self.origroot = path
   333         # These auditor are not used by the vfs,
   333         # These auditor are not used by the vfs,
   334         # only used when writing this comment: basectx.match
   334         # only used when writing this comment: basectx.match
   335         self.auditor = pathutil.pathauditor(self.root, self._checknested)
   335         self.auditor = pathutil.pathauditor(self.root, self._checknested)
   336         self.nofsauditor = pathutil.pathauditor(self.root, self._checknested,
   336         self.nofsauditor = pathutil.pathauditor(self.root, self._checknested,
   337                                                 realfs=False)
   337                                                 realfs=False, cached=True)
   338         self.baseui = baseui
   338         self.baseui = baseui
   339         self.ui = baseui.copy()
   339         self.ui = baseui.copy()
   340         self.ui.copy = baseui.copy # prevent copying repo configuration
   340         self.ui.copy = baseui.copy # prevent copying repo configuration
   341         self.vfs = vfsmod.vfs(self.path)
   341         self.vfs = vfsmod.vfs(self.path, cacheaudited=True)
   342         if (self.ui.configbool('devel', 'all-warnings') or
   342         if (self.ui.configbool('devel', 'all-warnings') or
   343             self.ui.configbool('devel', 'check-locks')):
   343             self.ui.configbool('devel', 'check-locks')):
   344             self.vfs.audit = self._getvfsward(self.vfs.audit)
   344             self.vfs.audit = self._getvfsward(self.vfs.audit)
   345         # A list of callback to shape the phase if no data were found.
   345         # A list of callback to shape the phase if no data were found.
   346         # Callback are in the form: func(repo, roots) --> processed root.
   346         # Callback are in the form: func(repo, roots) --> processed root.
   419             raise error.RepoError(_('repository is using sparse feature but '
   419             raise error.RepoError(_('repository is using sparse feature but '
   420                                     'sparse is not enabled; enable the '
   420                                     'sparse is not enabled; enable the '
   421                                     '"sparse" extensions to access'))
   421                                     '"sparse" extensions to access'))
   422 
   422 
   423         self.store = store.store(
   423         self.store = store.store(
   424                 self.requirements, self.sharedpath, vfsmod.vfs)
   424             self.requirements, self.sharedpath,
       
   425             lambda base: vfsmod.vfs(base, cacheaudited=True))
   425         self.spath = self.store.path
   426         self.spath = self.store.path
   426         self.svfs = self.store.vfs
   427         self.svfs = self.store.vfs
   427         self.sjoin = self.store.join
   428         self.sjoin = self.store.join
   428         self.vfs.createmode = self.store.createmode
   429         self.vfs.createmode = self.store.createmode
   429         self.cachevfs = vfsmod.vfs(cachepath)
   430         self.cachevfs = vfsmod.vfs(cachepath, cacheaudited=True)
   430         self.cachevfs.createmode = self.store.createmode
   431         self.cachevfs.createmode = self.store.createmode
   431         if (self.ui.configbool('devel', 'all-warnings') or
   432         if (self.ui.configbool('devel', 'all-warnings') or
   432             self.ui.configbool('devel', 'check-locks')):
   433             self.ui.configbool('devel', 'check-locks')):
   433             if util.safehasattr(self.svfs, 'vfs'): # this is filtervfs
   434             if util.safehasattr(self.svfs, 'vfs'): # this is filtervfs
   434                 self.svfs.vfs.audit = self._getsvfsward(self.svfs.vfs.audit)
   435                 self.svfs.vfs.audit = self._getsvfsward(self.svfs.vfs.audit)