store: initialize "vfs" fields by "vfs" constructors
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Fri, 31 Aug 2012 02:06:29 +0900
changeset 17653 dacb50696b75
parent 17652 2c6f7231becc
child 17654 1dc37491e9fb
store: initialize "vfs" fields by "vfs" constructors For backwards compatibility, "opener" fields are still left as aliases for "vfs" ones.
mercurial/store.py
--- a/mercurial/store.py	Fri Aug 31 02:06:29 2012 +0900
+++ b/mercurial/store.py	Fri Aug 31 02:06:29 2012 +0900
@@ -293,7 +293,8 @@
         self.createmode = _calcmode(path)
         vfs = vfstype(self.path)
         vfs.createmode = self.createmode
-        self.opener = scmutil.filteropener(vfs, encodedir)
+        self.vfs = scmutil.filtervfs(vfs, encodedir)
+        self.opener = self.vfs
 
     def join(self, f):
         return self.path + '/' + encodedir(f)
@@ -343,7 +344,8 @@
         self.createmode = _calcmode(self.path)
         vfs = vfstype(self.path)
         vfs.createmode = self.createmode
-        self.opener = scmutil.filteropener(vfs, encodefilename)
+        self.vfs = scmutil.filtervfs(vfs, encodefilename)
+        self.opener = self.vfs
 
     def datafiles(self):
         for a, b, size in self._walk('data', True):
@@ -451,7 +453,8 @@
         vfs.createmode = self.createmode
         fnc = fncache(vfs)
         self.fncache = fnc
-        self.opener = _fncachevfs(vfs, fnc, encode)
+        self.vfs = _fncachevfs(vfs, fnc, encode)
+        self.opener = self.vfs
 
     def join(self, f):
         return self.pathsep + self.encode(f)