diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-09-20 10:49:03 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-09-20 18:43:39 +0200 |
commit | 5fbba3abfa6e725b47a170b0c4f7ce5f8c2671e7 (patch) | |
tree | 77d3afb331013f83769d7b3007f722af821acd3e /src/other_tools/just_mr/cli.hpp | |
parent | 70aef852705090b48ded2842269daa7884fa54fd (diff) | |
download | justbuild-5fbba3abfa6e725b47a170b0c4f7ce5f8c2671e7.tar.gz |
just-mr: add option to override the absent pragma
Using absent repositories depends on a just-serve endpoint. As
such, it is not a datum of the project, but one of the available
infrastructure. As the latter can change independently of the
project, it is desriable to have the option to specify those pieces
of information in separate files.
Diffstat (limited to 'src/other_tools/just_mr/cli.hpp')
-rw-r--r-- | src/other_tools/just_mr/cli.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp index 328ab666..4c0c6e34 100644 --- a/src/other_tools/just_mr/cli.hpp +++ b/src/other_tools/just_mr/cli.hpp @@ -33,6 +33,7 @@ /// \brief Arguments common to all just-mr subcommands struct MultiRepoCommonArguments { std::optional<std::filesystem::path> repository_config{std::nullopt}; + std::optional<std::filesystem::path> absent_repository_file{std::nullopt}; std::optional<std::filesystem::path> checkout_locations_file{std::nullopt}; std::vector<std::string> explicit_distdirs{}; JustMR::PathsPtr just_mr_paths = std::make_shared<JustMR::Paths>(); @@ -98,6 +99,16 @@ static inline void SetupMultiRepoCommonArguments( "Repository-description file to use.") ->type_name("FILE"); app->add_option_function<std::string>( + "--absent", + [clargs](auto const& file_raw) { + clargs->absent_repository_file = + std::filesystem::weakly_canonical( + std::filesystem::absolute(file_raw)); + }, + "File specifying the repositories to consider absent (overrides the " + "pragma in the config file).") + ->type_name("FILE"); + app->add_option_function<std::string>( "--local-build-root", [clargs](auto const& local_build_root_raw) { clargs->just_mr_paths->root = std::filesystem::weakly_canonical( |