equal
deleted
inserted
replaced
137 $ hg clone --pull -q --config phases.publish=False ../a segv |
137 $ hg clone --pull -q --config phases.publish=False ../a segv |
138 $ rm -R limit/.hg/cache segv/.hg/cache |
138 $ rm -R limit/.hg/cache segv/.hg/cache |
139 |
139 |
140 $ $PYTHON <<EOF |
140 $ $PYTHON <<EOF |
141 > data = open("limit/.hg/store/00changelog.i", "rb").read() |
141 > data = open("limit/.hg/store/00changelog.i", "rb").read() |
142 > for n, p in [('limit', '\0\0\0\x02'), ('segv', '\0\x01\0\0')]: |
142 > for n, p in [(b'limit', b'\0\0\0\x02'), (b'segv', b'\0\x01\0\0')]: |
143 > # corrupt p1 at rev0 and p2 at rev1 |
143 > # corrupt p1 at rev0 and p2 at rev1 |
144 > d = data[:24] + p + data[28:127 + 28] + p + data[127 + 32:] |
144 > d = data[:24] + p + data[28:127 + 28] + p + data[127 + 32:] |
145 > open(n + "/.hg/store/00changelog.i", "wb").write(d) |
145 > open(n + b"/.hg/store/00changelog.i", "wb").write(d) |
146 > EOF |
146 > EOF |
147 |
147 |
148 $ hg -R limit debugindex -f1 -c |
148 $ hg -R limit debugindex -f1 -c |
149 rev flag size link p1 p2 nodeid |
149 rev flag size link p1 p2 nodeid |
150 0 0000 62 0 2 -1 7c31755bf9b5 |
150 0 0000 62 0 2 -1 7c31755bf9b5 |