spack/lib/spack
Massimiliano Culpo 0678d5df90 repo: generalize "swap" context manager to also accept paths
The method is now called "use_repositories" and
makes it clear in the docstring that it accepts
as arguments either Repo objects or paths.

Since there was some duplication between this
contextmanager and "use_repo" in the testing framework,
remove the latter and use spack.repo.use_repositories
across the entire code base.

Make a few adjustment to MockPackageMultiRepo, since it was
stating in the docstring that it was supposed to mock
spack.repo.Repo and was instead mocking spack.repo.RepoPath.

(cherry picked from commit 1a8963b0f4)
2021-05-21 17:59:50 +02:00
..
docs Typos: add missing closing parens (#20174) 2021-02-17 17:07:17 -08:00
env Support parallel environment builds (#18131) 2020-11-17 02:41:07 -08:00
external Python 3.10 support: collections.abc (#20441) 2021-05-21 14:55:18 +02:00
llnl Python 3.10 support: collections.abc (#20441) 2021-05-21 14:55:18 +02:00
spack repo: generalize "swap" context manager to also accept paths 2021-05-21 17:59:50 +02:00