# HG changeset patch # User Pierre-Yves David # Date 2017-03-02 12:33:16 # Node ID 6d44de27790cdcfa932865590a3f173c9f4aee5c # Parent e067741d46070919864eb691613d94d1672cbe88 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 < 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 < 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',