400 self.vfs, self.supported) |
400 self.vfs, self.supported) |
401 except IOError as inst: |
401 except IOError as inst: |
402 if inst.errno != errno.ENOENT: |
402 if inst.errno != errno.ENOENT: |
403 raise |
403 raise |
404 |
404 |
|
405 cachepath = self.vfs.join('cache') |
405 self.sharedpath = self.path |
406 self.sharedpath = self.path |
406 try: |
407 try: |
407 sharedpath = self.vfs.read("sharedpath").rstrip('\n') |
408 sharedpath = self.vfs.read("sharedpath").rstrip('\n') |
408 if 'relshared' in self.requirements: |
409 if 'relshared' in self.requirements: |
409 sharedpath = self.vfs.join(sharedpath) |
410 sharedpath = self.vfs.join(sharedpath) |
410 vfs = vfsmod.vfs(sharedpath, realpath=True) |
411 vfs = vfsmod.vfs(sharedpath, realpath=True) |
|
412 cachepath = vfs.join('cache') |
411 s = vfs.base |
413 s = vfs.base |
412 if not vfs.exists(): |
414 if not vfs.exists(): |
413 raise error.RepoError( |
415 raise error.RepoError( |
414 _('.hg/sharedpath points to nonexistent directory %s') % s) |
416 _('.hg/sharedpath points to nonexistent directory %s') % s) |
415 self.sharedpath = s |
417 self.sharedpath = s |
421 self.requirements, self.sharedpath, vfsmod.vfs) |
423 self.requirements, self.sharedpath, vfsmod.vfs) |
422 self.spath = self.store.path |
424 self.spath = self.store.path |
423 self.svfs = self.store.vfs |
425 self.svfs = self.store.vfs |
424 self.sjoin = self.store.join |
426 self.sjoin = self.store.join |
425 self.vfs.createmode = self.store.createmode |
427 self.vfs.createmode = self.store.createmode |
426 self.cachevfs = vfsmod.vfs(self.vfs.join('cache')) |
428 self.cachevfs = vfsmod.vfs(cachepath) |
427 self.cachevfs.createmode = self.store.createmode |
429 self.cachevfs.createmode = self.store.createmode |
428 if (self.ui.configbool('devel', 'all-warnings') or |
430 if (self.ui.configbool('devel', 'all-warnings') or |
429 self.ui.configbool('devel', 'check-locks')): |
431 self.ui.configbool('devel', 'check-locks')): |
430 if util.safehasattr(self.svfs, 'vfs'): # this is filtervfs |
432 if util.safehasattr(self.svfs, 'vfs'): # this is filtervfs |
431 self.svfs.vfs.audit = self._getsvfsward(self.svfs.vfs.audit) |
433 self.svfs.vfs.audit = self._getsvfsward(self.svfs.vfs.audit) |