Show More
@@ -26,7 +26,7 b' We approximate that by reducing the read' | |||||
26 | summary: change foo |
|
26 | summary: change foo | |
27 |
|
27 | |||
28 | $ cat >> test.py << EOF |
|
28 | $ cat >> test.py << EOF | |
29 |
> from mercurial import changelog, s |
|
29 | > from mercurial import changelog, vfs | |
30 | > from mercurial.node import * |
|
30 | > from mercurial.node import * | |
31 | > |
|
31 | > | |
32 | > class singlebyteread(object): |
|
32 | > class singlebyteread(object): | |
@@ -42,7 +42,7 b' We approximate that by reducing the read' | |||||
42 | > return getattr(self.real, key) |
|
42 | > return getattr(self.real, key) | |
43 | > |
|
43 | > | |
44 | > def opener(*args): |
|
44 | > def opener(*args): | |
45 |
> o = s |
|
45 | > o = vfs.vfs(*args) | |
46 | > def wrapper(*a): |
|
46 | > def wrapper(*a): | |
47 | > f = o(*a) |
|
47 | > f = o(*a) | |
48 | > return singlebyteread(f) |
|
48 | > return singlebyteread(f) | |
@@ -67,8 +67,8 b' Test SEGV caused by bad revision passed ' | |||||
67 | $ cd a |
|
67 | $ cd a | |
68 |
|
68 | |||
69 | $ python <<EOF |
|
69 | $ python <<EOF | |
70 |
> from mercurial import changelog, s |
|
70 | > from mercurial import changelog, vfs | |
71 |
> cl = changelog.changelog(s |
|
71 | > cl = changelog.changelog(vfs.vfs('.hg/store')) | |
72 | > print 'good heads:' |
|
72 | > print 'good heads:' | |
73 | > for head in [0, len(cl) - 1, -1]: |
|
73 | > for head in [0, len(cl) - 1, -1]: | |
74 | > print'%s: %r' % (head, cl.reachableroots(0, [head], [0])) |
|
74 | > print'%s: %r' % (head, cl.reachableroots(0, [head], [0])) | |
@@ -147,8 +147,8 b' Test corrupted p1/p2 fields that could c' | |||||
147 |
|
147 | |||
148 | $ cat <<EOF > test.py |
|
148 | $ cat <<EOF > test.py | |
149 | > import sys |
|
149 | > import sys | |
150 |
> from mercurial import changelog, s |
|
150 | > from mercurial import changelog, vfs | |
151 |
> cl = changelog.changelog(s |
|
151 | > cl = changelog.changelog(vfs.vfs(sys.argv[1])) | |
152 | > n0, n1 = cl.node(0), cl.node(1) |
|
152 | > n0, n1 = cl.node(0), cl.node(1) | |
153 | > ops = [ |
|
153 | > ops = [ | |
154 | > ('reachableroots', |
|
154 | > ('reachableroots', |
General Comments 0
You need to be logged in to leave comments.
Login now