( )⚙ D11715 dirstate: group return logic and clarify each function in flagfunc

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: group return logic and clarify each function in flagfunc
ClosedPublic

Authored by Alphare on Oct 21 2021, 3:42 AM.

Details

Summary

As suggested by spectral during review of my fix of the missing return, this
makes it more obvious that all cases are covered and improves readability of
the functions with new names and a small docstring.

Diff Detail

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

Event Timeline

Alphare created this revision.Oct 21 2021, 3:42 AM
baymax updated this revision to Diff 30977.Oct 21 2021, 1:51 PM

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

spectral accepted this revision.Oct 21 2021, 7:50 PM

Now that the fallback function is always being built- do the context.manifest(), dirstate.copies(), etc that get run in context._buildflagfunc() always have an acceptably low overhead?

Now that the fallback function is always being built

I don't think this is the case? It should be gated on the same conditions it was before.

Now that the fallback function is always being built

I don't think this is the case? It should be gated on the same conditions it was before.

Ah, right. It was a late night reviewing stuff...

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