This is an archive of the discontinued Mercurial Phabricator instance.

rust: Remove handling of `parents` in `DirstateMap`
ClosedPublic

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

Details

Summary

The Python wrapper class dirstatemap can take care of it.

This removes the need to have both _rustmap and _inner_rustmap.

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

While I'm always happy about removing code, what happens in a non-Python context? Are we ripping support for reading/setting parents? Or would that come back in a different form later?

We are removing support in hg-core’s DirstateMap for reading only parents from disk. (The logic for this still exists in hg_core::dirstate::parsers::parse_dirstate_parents) With this changset and the next, creating a DirstateMap means reading the entire dirstate from disk.

Reading the entire dirstate returns a DirstateParents to the caller. (This hasn’t changed.) Serializing an entire dirstate requires the caller to provide a DirstateParents. (This also hasn’t changed).

Alphare accepted this revision.May 3 2021, 3:18 PM
This revision is now accepted and ready to land.May 3 2021, 3:18 PM
baymax updated this revision to Diff 27631.May 6 2021, 12:04 PM

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

This revision was automatically updated to reflect the committed changes.