[PATCH 17 of 22] vfs: use 'vfs' module directly in 'hgext.largefile'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 8 16:18:28 EST 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1488457947 -3600
#      Thu Mar 02 13:32:27 2017 +0100
# Node ID 411f7ad0293ad358de1e0170b6443069fbf37ffc
# Parent  34deee8fb3f8b7298654223e87bcb46cfc6ca38d
# 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 411f7ad0293a
vfs: use 'vfs' module directly in 'hgext.largefile'

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.

diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py
+++ b/hgext/largefiles/lfutil.py
@@ -27,6 +27,7 @@ from mercurial import (
     pycompat,
     scmutil,
     util,
+    vfs as vfsmod,
 )
 
 shortname = '.hglf'
@@ -144,7 +145,7 @@ def openlfdirstate(ui, repo, create=True
     '''
     vfs = repo.vfs
     lfstoredir = longname
-    opener = scmutil.vfs(vfs.join(lfstoredir))
+    opener = vfsmod.vfs(vfs.join(lfstoredir))
     lfdirstate = largefilesdirstate(opener, ui, repo.root,
                                      repo.dirstate._validate)
 


More information about the Mercurial-devel mailing list