changeset 17653:dacb50696b75

store: initialize "vfs" fields by "vfs" constructors For backwards compatibility, "opener" fields are still left as aliases for "vfs" ones.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 31 Aug 2012 02:06:29 +0900
parents 2c6f7231becc
children 1dc37491e9fb
files mercurial/store.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)