Patchwork [05,of,22] vfs: use 'vfs' module directly in 'mercurial.archival'

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2017, 9:18 p.m.
Message ID <8384ca1f929ba06ca608.1489007896@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19003/
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 1488457828 -3600
#      Thu Mar 02 13:30:28 2017 +0100
# Node ID 8384ca1f929ba06ca60844d925d5089b0fbd4dd4
# Parent  0b88c6086f20be809ffe3f16ec7028a7d8a721a9
# 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 8384ca1f929b
vfs: use 'vfs' module directly in 'mercurial.archival'

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/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -22,8 +22,8 @@  from . import (
     encoding,
     error,
     match as matchmod,
-    scmutil,
     util,
+    vfs as vfsmod,
 )
 stringio = util.stringio
 
@@ -249,7 +249,7 @@  class fileit(object):
 
     def __init__(self, name, mtime):
         self.basedir = name
-        self.opener = scmutil.vfs(self.basedir)
+        self.opener = vfsmod.vfs(self.basedir)
 
     def addfile(self, name, mode, islink, data):
         if islink: