( )⚙ D10722 dirstate-v2: Change the on-disk format to be tree-shaped

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-v2: Change the on-disk format to be tree-shaped
ClosedPublic

Authored by SimonSapin on May 17 2021, 6:06 AM.

Details

Summary

Nodes are stored not only for tracked files but also for their ancestor
directories. A node has "pointers" (byte count from the start of the file)
to its direct child nodes. Everything can be accessed with zero copy.

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 17 2021, 6:06 AM
baymax updated this revision to Diff 28002.May 17 2021, 8:39 AM

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

Alphare accepted this revision.May 19 2021, 6:19 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
rust/hg-core/src/dirstate_tree/dirstate_map.rs
36

4 billion files is not webscale ;)

rust/hg-core/src/dirstate_tree/on_disk.rs
241

This will be done differently when we move to an append-only format anyway, no need to worry about it.

This revision is now accepted and ready to land.May 19 2021, 6:19 AM
baymax updated this revision to Diff 28103.May 19 2021, 7:41 AM

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