This is an archive of the discontinued Mercurial Phabricator instance.

rust-dirstate: add rust-cpython bindings to the new parse/pack functions
ClosedPublic

Authored by Alphare on May 6 2019, 5:03 PM.

Details

Summary

This allows for Python code to call parse/pack_dirstate transparently.

These bindings are heavy given the relatively simple task, as they are bound
to implementation details of both the C and Python code. They will be slimmed
down in future patches and eventually completely removed once more of the
dirstate code has been refactored/rewritten in Rust.

Both functions emulate the mutate-on-loop style of the Python and C
implementations by looping over changed items in the compatibility layer,
instead of at the core functions.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.