This is an archive of the discontinued Mercurial Phabricator instance.

statichttprepo: use new functions for requirements validation
ClosedPublic

Authored by indygreg on Sep 13 2018, 12:29 PM.

Details

Summary

The new code in localrepo for requirements gathering and validation
is more robust than scmutil.readrequires(). Let's port statichttprepo
to it.

Since scmutil.readrequires() is no longer used, it has been removed.

It is possible extensions were monkeypatching this to supplement the
set of supported requirements. But the proper way to do that is to
register a featuresetupfuncs. I'm comfortable forcing the API break
because featuresetupfuncs is more robust and has been supported for
a while.

.. api::

``scmutil.readrequires()`` has been removed.

Use ``localrepo.featuresetupfuncs`` to register new repository
requirements.

Use ``localrepo.ensurerequirementsrecognized()`` to validate them.

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.