Simon Sapin <simon.sapin@octobus.net> [Tue, 12 Oct 2021 17:57:57 +0200] rev 48195
dirstate-v2: Replace the 32-bit `mode` field with two bits
Previously we stored the entire value from `stat_result.st_mode`,
like dirstate-v1 does. However only the executable permission
and type of file (only symbolic links and normal files are supported)
are relevant to Mecurial.
So replace this field with two bits in the existing bitfield byte.
For now the unused space is left as padding, as it will be used
for something else soon.
Differential Revision: https://phab.mercurial-scm.org/D11635
Simon Sapin <simon.sapin@octobus.net> [Mon, 11 Oct 2021 18:37:21 +0200] rev 48194
dirstate-v2: Store unsigned integers inside DirstateEntry
The negative marker values are not used anymore.
Differential Revision: https://phab.mercurial-scm.org/D11634
Simon Sapin <simon.sapin@octobus.net> [Tue, 12 Oct 2021 16:38:13 +0200] rev 48193
dirstate-v2: Truncate directory mtimes to 31 bits of seconds
… 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.
Differential Revision: https://phab.mercurial-scm.org/D11633