Mercurial > hg-stable
changeset 51199:a6c49e5d573f
test: clarify test-parseindex offsets
We will make this revlog non-inline, so we clarify the code to make sure it is
simple to adjust the test later.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 07 Dec 2023 03:40:37 +0100 |
parents | 1c4180d49baf |
children | cf23a8432f51 |
files | tests/test-parseindex.t |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-parseindex.t Thu Dec 07 06:05:18 2023 +0100 +++ b/tests/test-parseindex.t Thu Dec 07 03:40:37 2023 +0100 @@ -145,8 +145,13 @@ > ] > for n, p in poisons: > # corrupt p1 at rev0 and p2 at rev1 - > d = data[:24] + p + data[28:127 + 28] + p + data[127 + 32:] - > open(n + b"/.hg/store/00changelog.i", "wb").write(d) + > rev_0 = data[:64 + 63] + > rev_1 = data[64 + 63:] + > altered_rev_0 = rev_0[:24] + p + rev_0[24 + 4:] + > altered_rev_1 = rev_1[:28] + p + rev_1[28 + 4:] + > new_data = altered_rev_0 + altered_rev_1 + > with open(n + b"/.hg/store/00changelog.i", "wb") as f: + > f.write(new_data) > EOF $ hg -R limit debugrevlogindex -f1 -c