Patchwork [12,of,22] vfs: use 'vfs' module directly in 'mercurial.unionrepo'

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2017, 9:18 p.m.
Message ID <60cfd83b136a361ab560.1489007903@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19010/
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 1488462590 -3600
#      Thu Mar 02 14:49:50 2017 +0100
# Node ID 60cfd83b136a361ab560fd877a6f550aa19a6600
# Parent  57d03221148b7af86e438bd2347bd34ffc64df5f
# 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 60cfd83b136a
vfs: use 'vfs' module directly in 'mercurial.unionrepo'

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/unionrepo.py b/mercurial/unionrepo.py
--- a/mercurial/unionrepo.py
+++ b/mercurial/unionrepo.py
@@ -27,8 +27,8 @@  from . import (
     pathutil,
     pycompat,
     revlog,
-    scmutil,
     util,
+    vfs as vfsmod,
 )
 
 class unionrevlog(revlog.revlog):
@@ -39,7 +39,7 @@  class unionrevlog(revlog.revlog):
         #
         # To differentiate a rev in the second revlog from a rev in the revlog,
         # we check revision against repotiprev.
-        opener = scmutil.readonlyvfs(opener)
+        opener = vfsmod.readonlyvfs(opener)
         revlog.revlog.__init__(self, opener, indexfile)
         self.revlog2 = revlog2