This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-tree: Serialize to disk
ClosedPublic

Authored by SimonSapin on Apr 20 2021, 10:17 AM.

Details

Summary

The existing pack_dirstate function relies on implementation details
of DirstateMap, so extract some parts of it as separate functions
for us in the tree-based DirstateMap.

The bytes-cast crate is updated to a version that has an as_bytes method,
not just from_bytes:
https://docs.rs/bytes-cast/0.2.0/bytes_cast/trait.BytesCast.html#method.as_bytes

Drive-by refactor clear_ambiguous_times which does part of the same thing.

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.Apr 20 2021, 10:17 AM
baymax updated this revision to Diff 27136.Apr 20 2021, 1:03 PM

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

Alphare accepted this revision.Apr 22 2021, 4:43 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
rust/hg-core/Cargo.toml
12

I know you're the author of that crate (and that this is because 0.2 adds supports for casting as bytes), but a general good practice when updating dependencies is to explain why you've done so in the commit message.

This revision is now accepted and ready to land.Apr 22 2021, 4:43 AM
SimonSapin marked an inline comment as done.May 3 2021, 5:55 AM
SimonSapin added inline comments.
rust/hg-core/Cargo.toml
12

Good point, I’ll amend the message.

SimonSapin edited the summary of this revision. (Show Details)May 3 2021, 6:24 AM
SimonSapin marked an inline comment as done.May 6 2021, 12:51 PM
This revision was automatically updated to reflect the committed changes.