This is an archive of the discontinued Mercurial Phabricator instance.

rust: Read dirstate from disk in DirstateMap constructor
ClosedPublic

Authored by SimonSapin on May 3 2021, 6:25 AM.

Details

Summary

Before this changeset, Python code first creates an empty DirstateMap Rust
object, then immediately calls its read method with a byte string of the
contents of the .hg/dirstate file.

This makes that byte string available to the constructor of DirstateMap
in the hg-cpython crate. This is a first step towards enabling parts of
DirstateMap in the hg-core crate to borrow from this buffer without copying.

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.

Event Timeline

SimonSapin created this revision.May 3 2021, 6:25 AM
Alphare accepted this revision.May 3 2021, 12:06 PM
This revision is now accepted and ready to land.May 3 2021, 12:06 PM
baymax updated this revision to Diff 27632.May 6 2021, 12:04 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)