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

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2017, 9:18 p.m.
Message ID <411f7ad0293ad358de1e.1489007908@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19015/
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 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.

Patch

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)