[PATCH 20 of 22] vfs: use 'vfs' module directly in 'test-parseindex'

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


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1488457996 -3600
#      Thu Mar 02 13:33:16 2017 +0100
# Node ID c199f438f992162952cafffe24e1d20b81bc164e
# Parent  320c87d10ee2d7272949cde00c632b099a88bd15
# 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 c199f438f992
vfs: use 'vfs' module directly in 'test-parseindex'

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/tests/test-parseindex.t b/tests/test-parseindex.t
--- a/tests/test-parseindex.t
+++ b/tests/test-parseindex.t
@@ -26,7 +26,7 @@ We approximate that by reducing the read
   summary:     change foo
   
   $ cat >> test.py << EOF
-  > from mercurial import changelog, scmutil
+  > from mercurial import changelog, vfs
   > from mercurial.node import *
   > 
   > class singlebyteread(object):
@@ -42,7 +42,7 @@ We approximate that by reducing the read
   >         return getattr(self.real, key)
   > 
   > def opener(*args):
-  >     o = scmutil.vfs(*args)
+  >     o = vfs.vfs(*args)
   >     def wrapper(*a):
   >         f = o(*a)
   >         return singlebyteread(f)
@@ -67,8 +67,8 @@ Test SEGV caused by bad revision passed 
   $ cd a
 
   $ python <<EOF
-  > from mercurial import changelog, scmutil
-  > cl = changelog.changelog(scmutil.vfs('.hg/store'))
+  > from mercurial import changelog, vfs
+  > cl = changelog.changelog(vfs.vfs('.hg/store'))
   > print 'good heads:'
   > for head in [0, len(cl) - 1, -1]:
   >     print'%s: %r' % (head, cl.reachableroots(0, [head], [0]))
@@ -147,8 +147,8 @@ Test corrupted p1/p2 fields that could c
 
   $ cat <<EOF > test.py
   > import sys
-  > from mercurial import changelog, scmutil
-  > cl = changelog.changelog(scmutil.vfs(sys.argv[1]))
+  > from mercurial import changelog, vfs
+  > cl = changelog.changelog(vfs.vfs(sys.argv[1]))
   > n0, n1 = cl.node(0), cl.node(1)
   > ops = [
   >     ('reachableroots',


More information about the Mercurial-devel mailing list