changeset 31231:0a38a313033e

vfs: use 'vfs' module directly in 'mercurial.localrepo' Now that the 'vfs' classes moved in their own module, lets use the new module directly. We update code iteratively to help with possible bisect needs in the future.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 02 Mar 2017 13:28:17 +0100
parents cc37b5a06e32
children 254f98326eef
files mercurial/localrepo.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Mar 08 13:46:26 2017 -0800
+++ b/mercurial/localrepo.py	Thu Mar 02 13:28:17 2017 +0100
@@ -59,6 +59,7 @@
     transaction,
     txnutil,
     util,
+    vfs as vfsmod,
 )
 
 release = lockmod.release
@@ -255,7 +256,7 @@
     def __init__(self, baseui, path, create=False):
         self.requirements = set()
         # vfs to access the working copy
-        self.wvfs = scmutil.vfs(path, expandpath=True, realpath=True)
+        self.wvfs = vfsmod.vfs(path, expandpath=True, realpath=True)
         # vfs to access the content of the repository
         self.vfs = None
         # vfs to access the store part of the repository
@@ -266,7 +267,7 @@
         self.auditor = pathutil.pathauditor(self.root, self._checknested)
         self.nofsauditor = pathutil.pathauditor(self.root, self._checknested,
                                                 realfs=False)
-        self.vfs = scmutil.vfs(self.path)
+        self.vfs = vfsmod.vfs(self.path)
         self.baseui = baseui
         self.ui = baseui.copy()
         self.ui.copy = baseui.copy # prevent copying repo configuration
@@ -331,8 +332,7 @@
             sharedpath = self.vfs.read("sharedpath").rstrip('\n')
             if 'relshared' in self.requirements:
                 sharedpath = self.vfs.join(sharedpath)
-            vfs = scmutil.vfs(sharedpath, realpath=True)
-
+            vfs = vfsmod.vfs(sharedpath, realpath=True)
             s = vfs.base
             if not vfs.exists():
                 raise error.RepoError(
@@ -343,7 +343,7 @@
                 raise
 
         self.store = store.store(
-                self.requirements, self.sharedpath, scmutil.vfs)
+                self.requirements, self.sharedpath, vfsmod.vfs)
         self.spath = self.store.path
         self.svfs = self.store.vfs
         self.sjoin = self.store.join