localrepo: use "vfs" intead of "opener" while ensuring repository directory
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Fri, 06 Jul 2012 18:45:27 +0900
changeset 17160 22b9b1d2f5d4
parent 17159 36a3016811d1
child 17161 be016e96117a
localrepo: use "vfs" intead of "opener" while ensuring repository directory As a part of migration to vfs, this patch uses "self.vfs" instead of "self.opener", while ensuring repository directory in the constructor of "localrepository" class.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Fri Jul 06 18:45:27 2012 +0900
+++ b/mercurial/localrepo.py	Fri Jul 06 18:45:27 2012 +0900
@@ -72,7 +72,7 @@
                         if self.ui.configbool('format', 'dotencode', True):
                             requirements.append('dotencode')
                     # create an invalid changelog
-                    self.opener.append(
+                    self.vfs.append(
                         "00changelog.i",
                         '\0\0\0\2' # represents revlogv2
                         ' dummy changelog to prevent using the old repo layout'
@@ -86,7 +86,7 @@
             raise error.RepoError(_("repository %s already exists") % path)
         else:
             try:
-                requirements = scmutil.readrequires(self.opener, self.supported)
+                requirements = scmutil.readrequires(self.vfs, self.supported)
             except IOError, inst:
                 if inst.errno != errno.ENOENT:
                     raise