mercurial/localrepo.py
changeset 33539 460733327640
parent 33538 54b36d3ff7f6
child 33541 b47fef6d2365
--- a/mercurial/localrepo.py	Sat Jul 15 23:05:15 2017 +0200
+++ b/mercurial/localrepo.py	Sat Jul 15 23:49:22 2017 +0200
@@ -402,12 +402,14 @@
                 if inst.errno != errno.ENOENT:
                     raise
 
+        cachepath = self.vfs.join('cache')
         self.sharedpath = self.path
         try:
             sharedpath = self.vfs.read("sharedpath").rstrip('\n')
             if 'relshared' in self.requirements:
                 sharedpath = self.vfs.join(sharedpath)
             vfs = vfsmod.vfs(sharedpath, realpath=True)
+            cachepath = vfs.join('cache')
             s = vfs.base
             if not vfs.exists():
                 raise error.RepoError(
@@ -423,7 +425,7 @@
         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 = vfsmod.vfs(cachepath)
         self.cachevfs.createmode = self.store.createmode
         if (self.ui.configbool('devel', 'all-warnings') or
             self.ui.configbool('devel', 'check-locks')):