mercurial/store.py
changeset 17724 bf4b72d8dd4d
parent 17722 3b976051034d
child 17725 ffd589d4b785
--- a/mercurial/store.py	Tue Oct 09 01:41:55 2012 +0900
+++ b/mercurial/store.py	Tue Oct 09 01:41:55 2012 +0900
@@ -291,9 +291,9 @@
 class basicstore(object):
     '''base class for local repository stores'''
     def __init__(self, path, vfstype):
-        self.path = path
+        vfs = vfstype(path)
+        self.path = vfs.base
         self.createmode = _calcmode(path)
-        vfs = vfstype(self.path)
         vfs.createmode = self.createmode
         self.vfs = scmutil.filtervfs(vfs, encodedir)
         self.opener = self.vfs
@@ -342,9 +342,9 @@
 
 class encodedstore(basicstore):
     def __init__(self, path, vfstype):
-        self.path = path + '/store'
+        vfs = vfstype(path + '/store')
+        self.path = vfs.base
         self.createmode = _calcmode(self.path)
-        vfs = vfstype(self.path)
         vfs.createmode = self.createmode
         self.vfs = scmutil.filtervfs(vfs, encodefilename)
         self.opener = self.vfs
@@ -448,10 +448,10 @@
         else:
             encode = _plainhybridencode
         self.encode = encode
-        self.path = path + '/store'
+        vfs = vfstype(path + '/store')
+        self.path = vfs.base
         self.pathsep = self.path + '/'
         self.createmode = _calcmode(self.path)
-        vfs = vfstype(self.path)
         vfs.createmode = self.createmode
         fnc = fncache(vfs)
         self.fncache = fnc