diff options
-rw-r--r-- | src/other_tools/just_mr/main.cpp | 6 | ||||
-rw-r--r-- | src/other_tools/ops_maps/content_cas_map.hpp | 4 | ||||
-rw-r--r-- | src/other_tools/repo_map/repos_to_setup_map.cpp | 21 | ||||
-rw-r--r-- | src/other_tools/root_maps/commit_git_map.hpp | 2 | ||||
-rw-r--r-- | src/other_tools/root_maps/distdir_git_map.hpp | 2 |
5 files changed, 25 insertions, 10 deletions
diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp index 66fce212..f7e5ae1f 100644 --- a/src/other_tools/just_mr/main.cpp +++ b/src/other_tools/just_mr/main.cpp @@ -693,8 +693,10 @@ void DefaultReachableRepositories( : std::nullopt, /* sha256 */ repo_desc_sha512->IsString() ? std::make_optional(repo_desc_sha512->String()) - : std::nullopt /* sha512 */ - }, /* archive */ + : std::nullopt, /* sha512 */ + repo_name, /* origin */ + false /* origin_from_distdir */ + }, /* archive */ repo_type_str, subdir.empty() ? "." : subdir.string()}; // add to list diff --git a/src/other_tools/ops_maps/content_cas_map.hpp b/src/other_tools/ops_maps/content_cas_map.hpp index 9d4954d5..895aa518 100644 --- a/src/other_tools/ops_maps/content_cas_map.hpp +++ b/src/other_tools/ops_maps/content_cas_map.hpp @@ -28,6 +28,10 @@ struct ArchiveContent { std::string fetch_url; std::optional<std::string> sha256; std::optional<std::string> sha512; + // name of repository for which work is done; used in progress reporting + std::string origin; + // flag deciding whether progress reporting is needed for key + bool origin_from_distdir; [[nodiscard]] auto operator==(const ArchiveContent& other) const -> bool { return content == other.content; diff --git a/src/other_tools/repo_map/repos_to_setup_map.cpp b/src/other_tools/repo_map/repos_to_setup_map.cpp index 0556ece0..bd34a231 100644 --- a/src/other_tools/repo_map/repos_to_setup_map.cpp +++ b/src/other_tools/repo_map/repos_to_setup_map.cpp @@ -89,10 +89,11 @@ void GitCheckout(ExpressionPtr const& repo_desc, .lexically_normal(); // populate struct GitRepoInfo git_repo_info = { - repo_desc_commit->get()->String(), /* hash */ - repo_desc_repository->get()->String(), /* repo_url */ - repo_desc_branch->get()->String(), /* branch */ - subdir.empty() ? "." : subdir.string() /* subdir */ + repo_desc_commit->get()->String(), /* hash */ + repo_desc_repository->get()->String(), /* repo_url */ + repo_desc_branch->get()->String(), /* branch */ + subdir.empty() ? "." : subdir.string(), /* subdir */ + repo_name /* origin */ }; // get the WS root as git tree commit_git_map->ConsumeAfterKeysReady( @@ -172,7 +173,9 @@ void ArchiveCheckout(ExpressionPtr const& repo_desc, : std::nullopt, /* sha256 */ repo_desc_sha512->IsString() ? std::make_optional(repo_desc_sha512->String()) - : std::nullopt /* sha512 */ + : std::nullopt, /* sha512 */ + repo_name, /* origin */ + false /* origin_from_distdir */ }, /* archive */ repo_type, /* repo_type */ subdir.empty() ? "." : subdir.string() /* subdir */ @@ -395,8 +398,10 @@ void DistdirCheckout(ExpressionPtr const& repo_desc, : std::nullopt, /* sha256 */ repo_desc_sha512->IsString() ? std::make_optional(repo_desc_sha512->String()) - : std::nullopt /* sha512 */ - }; /* archive */ + : std::nullopt, /* sha512 */ + dist_repo_name, /* origin */ + true /* origin_from_distdir */ + }; /* archive */ // add to distdir content map auto repo_distfile = @@ -415,7 +420,7 @@ void DistdirCheckout(ExpressionPtr const& repo_desc, .HexString(); // get the WS root as git tree DistdirInfo distdir_info = { - distdir_content_id, distdir_content, dist_repos_to_fetch}; + distdir_content_id, distdir_content, dist_repos_to_fetch, repo_name}; distdir_git_map->ConsumeAfterKeysReady( ts, {std::move(distdir_info)}, diff --git a/src/other_tools/root_maps/commit_git_map.hpp b/src/other_tools/root_maps/commit_git_map.hpp index 1a0252dd..163163d2 100644 --- a/src/other_tools/root_maps/commit_git_map.hpp +++ b/src/other_tools/root_maps/commit_git_map.hpp @@ -28,6 +28,8 @@ struct GitRepoInfo { std::string repo_url{}; std::string branch{}; std::string subdir{}; /* key */ + // name of repository for which work is done; used in progress reporting + std::string origin{}; [[nodiscard]] auto operator==(const GitRepoInfo& other) const -> bool { return hash == other.hash and subdir == other.subdir; diff --git a/src/other_tools/root_maps/distdir_git_map.hpp b/src/other_tools/root_maps/distdir_git_map.hpp index 8afeb3d9..8f7796e3 100644 --- a/src/other_tools/root_maps/distdir_git_map.hpp +++ b/src/other_tools/root_maps/distdir_git_map.hpp @@ -23,6 +23,8 @@ struct DistdirInfo { std::string content_id; /* key */ std::shared_ptr<std::unordered_map<std::string, std::string>> content_list; std::shared_ptr<std::vector<ArchiveContent>> repos_to_fetch; + // name of repository for which work is done; used in progress reporting + std::string origin; [[nodiscard]] auto operator==(const DistdirInfo& other) const noexcept -> bool { |