Patchwork [07,of,22] vfs: use 'vfs' module directly in 'mercurial.cmdutil'

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2017, 9:18 p.m.
Message ID <2c27b19bbea4f4e86dd9.1489007898@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19005/
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 1488457847 -3600
#      Thu Mar 02 13:30:47 2017 +0100
# Node ID 2c27b19bbea4f4e86dd9a8b2130fb2a50d043fc6
# Parent  9cbaa5117a40aa64befe4db8859c86e9480509c4
# 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 2c27b19bbea4
vfs: use 'vfs' module directly in 'mercurial.cmdutil'

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/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -45,6 +45,7 @@  from . import (
     templatekw,
     templater,
     util,
+    vfs as vfsmod,
 )
 stringio = util.stringio
 
@@ -583,7 +584,7 @@  def openrevlog(repo, cmd, file_, opts):
             raise error.CommandError(cmd, _('invalid arguments'))
         if not os.path.isfile(file_):
             raise error.Abort(_("revlog '%s' not found") % file_)
-        r = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False),
+        r = revlog.revlog(vfsmod.vfs(pycompat.getcwd(), audit=False),
                           file_[:-2] + ".i")
     return r