( )⚙ D11546 dirstate-v2: Add internal documentation

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-v2: Add internal documentation
ClosedPublic

Authored by SimonSapin on Oct 1 2021, 9:41 AM.

Details

Summary

It can be viewed by running hg help internals.dirstate-v2

Since that command rewraps paragraphs, the source text is written with
semantic line breaks: https://sembr.org/

Diff Detail

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

Event Timeline

SimonSapin created this revision.Oct 1 2021, 9:41 AM
SimonSapin updated this revision to Diff 30504.Oct 1 2021, 11:58 AM
Alphare added a subscriber: Alphare.Oct 1 2021, 1:03 PM
Alphare added inline comments.
mercurial/helptext/internals/dirstate-v2.txt
143

missing "in"

192

s/madata/metadata/

245

Should we just have 32 bytes because why not? I get that the cryptographic aspect of it is not important for that particular case, but we may want to use another hash function that is a bit longer and truncating would not be ideal.

295

missing "in"

304

nit: I'd maybe avoid using "string" since it's really bytes and not a more abstract construct with encoding and such in mind

marmoute added inline comments.
mercurial/helptext/internals/dirstate-v2.txt
245

Since this changesets only document the existing format, I don't feel like it is the right location to discuss the actual format. Not sure where that would be through.

On the actual topic, I feel like that if we decide for a wider format, we should probably pick 40 bytes to have all the rooms we might need.

304

I replaced "byte strings" with "byte ranges" does it works for you ?

Alphare added inline comments.Oct 3 2021, 5:21 PM
mercurial/helptext/internals/dirstate-v2.txt
245

Sure

304

I'm still seeing "string", but using "byte ranges" will work

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.