Mercurial > hg
diff tests/test-rust-revlog.py @ 44012:443dc1655923
rust-index: expose a method to retrieve the C index
The code for `shortesthexnodeidprefix` need to access the actual C index. For
now we grant its wish and expose a method to do so. Once we have the nodemap in
Rust, we will be able to implement the same feature from rust and we will be
able to drop this method.
Differential Revision: https://phab.mercurial-scm.org/D7658
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Thu, 12 Dec 2019 03:39:14 +0100 |
parents | c627f1b2f3c3 |
children | 89a2afe31e82 |
line wrap: on
line diff
--- a/tests/test-rust-revlog.py Thu Dec 12 18:11:44 2019 +0100 +++ b/tests/test-rust-revlog.py Thu Dec 12 03:39:14 2019 +0100 @@ -25,6 +25,13 @@ rustidx = revlog.MixedIndex(idx) 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) + cidx = rustidx.get_cindex() + self.assertTrue(idx is cidx) + def test_len(self): idx = self.parseindex() rustidx = revlog.MixedIndex(idx)