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

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


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at 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.

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
 


More information about the Mercurial-devel mailing list