Patchwork [09,of,22] vfs: use 'vfs' module directly in 'mercurial.debugcommand'

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2017, 9:18 p.m.
Message ID <8946a52d22e991e168df.1489007900@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19007/
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 1488457867 -3600
#      Thu Mar 02 13:31:07 2017 +0100
# Node ID 8946a52d22e991e168df21399f5786969551b55f
# Parent  f9b148da25f6a92866ac52ec185a9cf0f622ae06
# 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 8946a52d22e9
vfs: use 'vfs' module directly in 'mercurial.debugcommand'

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/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -63,6 +63,7 @@  from . import (
     templater,
     treediscovery,
     util,
+    vfs as vfsmod,
 )
 
 release = lockmod.release
@@ -76,7 +77,7 @@  def debugancestor(ui, repo, *args):
     """find the ancestor revision of two revisions in a given index"""
     if len(args) == 3:
         index, rev1, rev2 = args
-        r = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False), index)
+        r = revlog.revlog(vfsmod.vfs(pycompat.getcwd(), audit=False), index)
         lookup = r.lookup
     elif len(args) == 2:
         if not repo:
@@ -452,7 +453,7 @@  def debugdag(ui, repo, file_=None, *revs
     spaces = opts.get('spaces')
     dots = opts.get('dots')
     if file_:
-        rlog = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False),
+        rlog = revlog.revlog(vfsmod.vfs(pycompat.getcwd(), audit=False),
                              file_)
         revs = set((int(r) for r in revs))
         def events():