This is an archive of the discontinued Mercurial Phabricator instance.

flagprocessors: introduce specialized functions
ClosedPublic

Authored by marmoute on Sep 7 2019, 5:27 AM.

Details

Summary

This make the call site clearer and the open the way to more diverse return
types.

For now, the same old code is still in use under the hood.

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.Sep 7 2019, 5:27 AM
indygreg accepted this revision.Sep 7 2019, 1:00 PM
indygreg added a subscriber: indygreg.
indygreg added inline comments.
mercurial/revlogutils/flagutil.py
98

Please follow up to make this more strongly typed by checking operation == 'write'.

This revision is now accepted and ready to land.Sep 7 2019, 1:00 PM
This revision was automatically updated to reflect the committed changes.
indygreg added inline comments.Sep 7 2019, 1:05 PM
mercurial/revlogutils/flagutil.py
151

Please follow-up with a fix for the docstring to reflect that this does not return a 2-tuple.