( )⚙ D12124 dirstate: introduce a "tracked-key" feature

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: introduce a "tracked-key" feature
ClosedPublic

Authored by marmoute on Jan 31 2022, 10:30 AM.

Details

Summary

A new format variant is introduced. When used, a tracked-key file will be
generated. That file will be update when the set of tracked file might have
changed. This will be useful for external automation (e.g. build tool) to be
notified when the set of relevant files changes.

One of the motivation for this changes is to mitigate effect dirstate-v2 has on
such automation. Since the dirstate file is updated much more frequently on
dirstate-v2, monitoring update to that file is no longer a viable strategy.

See the associated documentation for details about the feature

To prevent older client to update the repository without updating that file, a
new requirements is introduced.

The postfinalizegenerators business is a bit weird, so I'll likely clean that
up soon.

Diff Detail

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

Event Timeline

marmoute created this revision.Jan 31 2022, 10:30 AM
Alphare added a subscriber: Alphare.Feb 3 2022, 5:29 AM
Alphare added inline comments.
mercurial/helptext/config.txt
947

This will need a typo pass, we can figure it out outside of phab

mercurial/requirements.py
21

nit: should we drop the v1? We haven't done it for other requirements that I know of

marmoute added inline comments.Feb 3 2022, 11:01 AM
mercurial/requirements.py
21

The 1 format is very basic, but fits our needs.

I expect others might wants some more meaningful format so I and putting the versioning scheme forward early. The whole things is experimental still so we can probably iron this out by the freeze.

Alphare accepted this revision.Feb 3 2022, 11:02 AM
Alphare added inline comments.
mercurial/requirements.py
21

Sure

This revision is now accepted and ready to land.Feb 3 2022, 11:02 AM
This revision was automatically updated to reflect the committed changes.