This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: use a single closure for get_flags
ClosedPublic

Authored by marmoute on Oct 28 2021, 5:14 PM.

Details

Summary

The previous code was overlooking fallback when neither symlink not exec was
supported.

The number of "variants" is getting too high, so I am consolidating this in a
single closure that should be easier to maintains.

This also ensure that fallback flags are always taken into account.

(they are not user code yet, but small experimentation shown that the feature
was working as intended.)

A a small side effect we need to check for symlink support more lazily and this
show up in the test in a couple of places.

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 28 2021, 5:14 PM
Alphare added a subscriber: Alphare.EditedOct 29 2021, 3:43 AM

The code looks good, but I'd prefer if there were a small docstring explaining what the two fallback mechanisms (e.g. the dirstatev2 one and the manifest one) are.

The code looks good, but I'd prefer if there were a small docstring explaining what the two fallback mechanism (e.g. the dirstatev2 one and the manifest one) are.

good idea, pushing this.

This is probably stuck somewhere isn't it?

This is probably stuck somewhere isn't it?

I refresh the flaky bits of the CI, and I hoping for the automatic refresh to work this time.

baymax updated this revision to Diff 31004.Oct 29 2021, 8:45 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

Alphare accepted this revision.Oct 29 2021, 8:46 AM

Thanks. I'll amend the typos but this looks good.

This revision is now accepted and ready to land.Oct 29 2021, 8:46 AM
This revision was automatically updated to reflect the committed changes.