337 self.origroot = path |
337 self.origroot = path |
338 # These auditor are not used by the vfs, |
338 # These auditor are not used by the vfs, |
339 # only used when writing this comment: basectx.match |
339 # only used when writing this comment: basectx.match |
340 self.auditor = pathutil.pathauditor(self.root, self._checknested) |
340 self.auditor = pathutil.pathauditor(self.root, self._checknested) |
341 self.nofsauditor = pathutil.pathauditor(self.root, self._checknested, |
341 self.nofsauditor = pathutil.pathauditor(self.root, self._checknested, |
342 realfs=False) |
342 realfs=False, cached=True) |
343 self.baseui = baseui |
343 self.baseui = baseui |
344 self.ui = baseui.copy() |
344 self.ui = baseui.copy() |
345 self.ui.copy = baseui.copy # prevent copying repo configuration |
345 self.ui.copy = baseui.copy # prevent copying repo configuration |
346 self.vfs = vfsmod.vfs(self.path) |
346 self.vfs = vfsmod.vfs(self.path, cacheaudited=True) |
347 if (self.ui.configbool('devel', 'all-warnings') or |
347 if (self.ui.configbool('devel', 'all-warnings') or |
348 self.ui.configbool('devel', 'check-locks')): |
348 self.ui.configbool('devel', 'check-locks')): |
349 self.vfs.audit = self._getvfsward(self.vfs.audit) |
349 self.vfs.audit = self._getvfsward(self.vfs.audit) |
350 # A list of callback to shape the phase if no data were found. |
350 # A list of callback to shape the phase if no data were found. |
351 # Callback are in the form: func(repo, roots) --> processed root. |
351 # Callback are in the form: func(repo, roots) --> processed root. |
424 raise error.RepoError(_('repository is using sparse feature but ' |
424 raise error.RepoError(_('repository is using sparse feature but ' |
425 'sparse is not enabled; enable the ' |
425 'sparse is not enabled; enable the ' |
426 '"sparse" extensions to access')) |
426 '"sparse" extensions to access')) |
427 |
427 |
428 self.store = store.store( |
428 self.store = store.store( |
429 self.requirements, self.sharedpath, vfsmod.vfs) |
429 self.requirements, self.sharedpath, |
|
430 lambda base: vfsmod.vfs(base, cacheaudited=True)) |
430 self.spath = self.store.path |
431 self.spath = self.store.path |
431 self.svfs = self.store.vfs |
432 self.svfs = self.store.vfs |
432 self.sjoin = self.store.join |
433 self.sjoin = self.store.join |
433 self.vfs.createmode = self.store.createmode |
434 self.vfs.createmode = self.store.createmode |
434 self.cachevfs = vfsmod.vfs(cachepath) |
435 self.cachevfs = vfsmod.vfs(cachepath, cacheaudited=True) |
435 self.cachevfs.createmode = self.store.createmode |
436 self.cachevfs.createmode = self.store.createmode |
436 if (self.ui.configbool('devel', 'all-warnings') or |
437 if (self.ui.configbool('devel', 'all-warnings') or |
437 self.ui.configbool('devel', 'check-locks')): |
438 self.ui.configbool('devel', 'check-locks')): |
438 if util.safehasattr(self.svfs, 'vfs'): # this is filtervfs |
439 if util.safehasattr(self.svfs, 'vfs'): # this is filtervfs |
439 self.svfs.vfs.audit = self._getsvfsward(self.svfs.vfs.audit) |
440 self.svfs.vfs.audit = self._getsvfsward(self.svfs.vfs.audit) |