Skip to content
Snippets Groups Projects
Commit 6a3162ed authored by Gregory Szorc's avatar Gregory Szorc
Browse files

localrepo: read requirements file in makelocalrepository()

Previously, scmutil.readrequires() loaded the requirements file
and validated its content against what was supported.

Requirements translate to repository features and are critical to
our plans to dynamically create local repository types. So, we must
load them in makelocalrepository() before a repository instance is
constructed.

This commit moves the reading of the .hg/requires file to
makelocalrepository(). Because scmutil.readrequires() was performing
I/O and validation, we inlined the validation into
localrepository.__init__ and removed scmutil.readrequires().

I plan to remove scmutil.readrequires() in a future commit (we can't
do it now because statichttprepo uses it).

Differential Revision: https://phab.mercurial-scm.org/D4568
parent 2f067e36
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment