Page MenuHomePhabricator

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

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



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

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