Page MenuHomePhabricator

extension: add a `required` suboption to enforce the use of an extensions
ClosedPublic

Authored by marmoute on Nov 29 2021, 11:51 AM.

Details

Summary

If required is set, failing to load an extensions will abort. See the test
and 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.Nov 29 2021, 11:51 AM
mharbison72 added inline comments.
mercurial/extensions.py
325–326

Is there any precedent for multiple hints outside of evolve? I can't think of a time when a hint would already be present, but it seems like this hint would be always useful to show?

marmoute added inline comments.Nov 30 2021, 9:36 AM
mercurial/extensions.py
325–326

It isn't multiline, it is a single line (just a tad 86 char long), but heavily indented so I had to cut the line in two in the source.

Alphare accepted this revision.Nov 30 2021, 9:39 AM
This revision is now accepted and ready to land.Nov 30 2021, 9:39 AM