This is an archive of the discontinued Mercurial Phabricator instance.

rust-index: add a struct wrapping the C index
ClosedPublic

Authored by marmoute on Dec 13 2019, 3:11 PM.

Details

Summary

Implementing the full index logic in one go is journey larger than we would
like.

To achieve a smoother transition, we start with a simple Rust wrapper that delegates
allwork to the current C implementation. Once we will have a fully working index
object in Rust, we can easily start using more and more Rust Code with it.

The object in this patch is functional and tested. However, multiple of the
currently existing rust (in the hg-cpython crate) requires a Graph. Right
now we build this Graph (as cindex::Index) using the C index passed as
a PyObject. They will have to be updated to be made compatible.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

marmoute created this revision.Dec 13 2019, 3:11 PM
marmoute updated this revision to Diff 18888.Dec 19 2019, 1:09 PM
Alphare accepted this revision.Dec 20 2019, 3:38 AM
indygreg accepted this revision.Dec 23 2019, 1:01 PM
indygreg added a subscriber: indygreg.
indygreg added inline comments.
tests/test-rust-revlog.py
17

ancestor should probably be revlog here. I can fix in flight.

This revision is now accepted and ready to land.Dec 23 2019, 1:01 PM
This revision was automatically updated to reflect the committed changes.