Page MenuHomePhabricator

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

Authored by SimonSapin on Tue, Oct 12, 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.Tue, Oct 12, 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.