Mercurial > public > mercurial-scm > hg-stable
diff tests/test-rust-revlog.py @ 51274:96e05f1a99bd
rust-index: stop instantiating a C Index
The only missing piece was the `cache` to be returned from
`revlog.parse_index_v1_mixed`, and it really seems that it is
essentially repetition of the input, if `inline` is `True`.
Not worth a Rust implementation (C implementation is probably there
for historical reasons).
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Sun, 29 Oct 2023 23:54:05 +0100 |
parents | 0409bd6ba663 |
children | f94c10334bcb |
line wrap: on
line diff
--- a/tests/test-rust-revlog.py Mon Oct 30 21:28:30 2023 +0100 +++ b/tests/test-rust-revlog.py Sun Oct 29 23:54:05 2023 +0100 @@ -27,24 +27,16 @@ class RustRevlogIndexTest(revlogtesting.RevlogBasedTestBase): def test_heads(self): idx = self.parseindex() - rustidx = revlog.MixedIndex(idx, revlogtesting.data_non_inlined, header) + rustidx = revlog.MixedIndex(revlogtesting.data_non_inlined, header) self.assertEqual(rustidx.headrevs(), idx.headrevs()) - def test_get_cindex(self): - # drop me once we no longer need the method for shortest node - idx = self.parseindex() - rustidx = revlog.MixedIndex(idx, revlogtesting.data_non_inlined, header) - cidx = rustidx.get_cindex() - self.assertTrue(idx is cidx) - def test_len(self): idx = self.parseindex() - rustidx = revlog.MixedIndex(idx, revlogtesting.data_non_inlined, header) + rustidx = revlog.MixedIndex(revlogtesting.data_non_inlined, header) self.assertEqual(len(rustidx), len(idx)) def test_ancestors(self): - idx = self.parseindex() - rustidx = revlog.MixedIndex(idx, revlogtesting.data_non_inlined, header) + rustidx = revlog.MixedIndex(revlogtesting.data_non_inlined, header) lazy = LazyAncestors(rustidx, [3], 0, True) # we have two more references to the index: # - in its inner iterator for __contains__ and __bool__