From 5fbba3abfa6e725b47a170b0c4f7ce5f8c2671e7 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 20 Sep 2023 10:49:03 +0200 Subject: 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. --- src/other_tools/just_mr/cli.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/other_tools/just_mr/cli.hpp') 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 repository_config{std::nullopt}; + std::optional absent_repository_file{std::nullopt}; std::optional checkout_locations_file{std::nullopt}; std::vector explicit_distdirs{}; JustMR::PathsPtr just_mr_paths = std::make_shared(); @@ -97,6 +98,16 @@ static inline void SetupMultiRepoCommonArguments( }, "Repository-description file to use.") ->type_name("FILE"); + app->add_option_function( + "--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( "--local-build-root", [clargs](auto const& local_build_root_raw) { -- cgit v1.2.3