( )⚙ D11633 dirstate-v2: Truncate directory mtimes to 31 bits of seconds

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-v2: Truncate directory mtimes to 31 bits of seconds
ClosedPublic

Authored by SimonSapin on Oct 12 2021, 1:00 PM.

Details

Summary

… instead of 64 bits, while keeping the sub-second presision.
This brings the size of one timestamp from 12 bytes to 8 bytes.

31 bits is chosen instead of 32 because that’s already what happens for the
mtime of files and symlinks, because dirstate-v1 uses negative i32 values as
markers.

Later we’ll add sub-second precision for file/symlink mtimes, making their
dirstate-v2 representation the same as for directories.

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.Oct 12 2021, 1:00 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.