diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-08-24 14:02:37 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-08-25 18:11:23 +0200 |
commit | 089733c819066b801e28d6441cbff887e60aef51 (patch) | |
tree | b5d1528c0ce3e25f042c70684812711fa33fb9b8 /src/other_tools/just_mr/fetch.cpp | |
parent | 833974c986eb46f88c87b3a95b4b840a333b24da (diff) | |
download | justbuild-089733c819066b801e28d6441cbff887e60aef51.tar.gz |
just-mr fetch: Allow to back up fetched archives to a given remote CAS
Diffstat (limited to 'src/other_tools/just_mr/fetch.cpp')
-rw-r--r-- | src/other_tools/just_mr/fetch.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index 49cca32e..4519a2cc 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -264,8 +264,12 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config, local_api ? &(*local_api) : nullptr, remote_api ? &(*remote_api) : nullptr, common_args.jobs); - auto repo_fetch_map = - CreateRepoFetchMap(&content_cas_map, *fetch_dir, common_args.jobs); + auto repo_fetch_map = CreateRepoFetchMap( + &content_cas_map, + *fetch_dir, + (fetch_args.backup_to_remote and local_api) ? &(*local_api) : nullptr, + (fetch_args.backup_to_remote and remote_api) ? &(*remote_api) : nullptr, + common_args.jobs); // set up progress observer JustMRProgress::Instance().SetTotal(repos_to_fetch.size()); |