This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-v2: preserve the fallback values on disk
ClosedPublic

Authored by marmoute on Oct 18 2021, 9:20 PM.

Details

Summary

When the fallback values are set, they are now read and written to disk.

See format documentation for details.

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

marmoute created this revision.Oct 18 2021, 9:20 PM

LGTM

mercurial/helptext/internals/dirstate-v2.txt
576–579

Looking further ahead to the UI, it would feel weird if it was a command that only worked on Windows. Is the plan to simply chmod+x the file on !windows, and then continue on looking to the filesystem like is done now? Is that too complicated with symlinks (where you'd have to delete the existing file/symlink and create a symlink/file when the filesystem supports symlinks)?

Alphare added inline comments.
mercurial/helptext/internals/dirstate-v2.txt
567

Maybe the entry carries "fallback" information?

582

Same change as above

marmoute updated this revision to Diff 30893.Oct 19 2021, 7:49 AM
marmoute updated this revision to Diff 30895.Oct 19 2021, 9:20 AM
marmoute added inline comments.Oct 19 2021, 9:21 AM
mercurial/helptext/internals/dirstate-v2.txt
576–579

The plan will always be to look at things in this order:

  1. the file system
  2. the fallback value
  3. the parents manifests

(this series introduce a (2) here).

The first user of this logic will be the merge code so that they can properly apply mode changes on system where the mode is unsupported.

It will also make sense to add some command to manually set this. In such case, this would also update -on-disk- status on the file for consistency.

I don't think either of the above will be present in 6.0 for time constraint reason, but it is important to have the semantic added early.

Does this address your question ?

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