Patchwork [06,of,22] vfs: use 'vfs' module directly in 'mercurial.subrepo'

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2017, 9:18 p.m.
Message ID <9cbaa5117a40aa64befe.1489007897@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19004/
State Accepted
Headers show

Comments

Pierre-Yves David - March 8, 2017, 9:18 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1488457838 -3600
#      Thu Mar 02 13:30:38 2017 +0100
# Node ID 9cbaa5117a40aa64befe4db8859c86e9480509c4
# Parent  8384ca1f929ba06ca60844d925d5089b0fbd4dd4
# EXP-Topic vfs.cleanup
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 9cbaa5117a40
vfs: use 'vfs' module directly in 'mercurial.subrepo'

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.

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -35,6 +35,7 @@  from . import (
     pycompat,
     scmutil,
     util,
+    vfs as vfsmod,
 )
 
 hg = None
@@ -615,7 +616,7 @@  class abstractsubrepo(object):
     def wvfs(self):
         """return vfs to access the working directory of this subrepository
         """
-        return scmutil.vfs(self._ctx.repo().wvfs.join(self._path))
+        return vfsmod.vfs(self._ctx.repo().wvfs.join(self._path))
 
     @propertycache
     def _relpath(self):
@@ -677,7 +678,7 @@  class hgsubrepo(abstractsubrepo):
 
     @propertycache
     def _cachestorehashvfs(self):
-        return scmutil.vfs(self._repo.join('cache/storehash'))
+        return vfsmod.vfs(self._repo.join('cache/storehash'))
 
     def _readstorehashcache(self, remotepath):
         '''read the store hash cache for a given remote repository'''