( )⚙ D11635 dirstate-v2: Replace the 32-bit `mode` field with two bits

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-v2: Replace the 32-bit `mode` field with two bits
ClosedPublic

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

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

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.
mercurial/helptext/internals/dirstate-v2.txt