comparison tests/test-parseindex.t @ 38087:307b19c7c043

py3: add b'' prefixes in tests/test-parseindex.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3611
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 19 May 2018 18:55:30 +0530
parents ce307af030a2
children f0fadc5bea21
comparison
equal deleted inserted replaced
38086:b95a6fb7ae66 38087:307b19c7c043
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