diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-07-19 15:13:20 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-08-07 17:01:01 +0200 |
commit | 643966865d6ff5292b59f876a78c7c67a90ddb16 (patch) | |
tree | a25d04b7e22bc2b0b61c606fe069045f9371e63d /src/other_tools/just_mr/utils.cpp | |
parent | 3d8c5f59656a32acd204855e2b712641bde46ac9 (diff) | |
download | justbuild-643966865d6ff5292b59f876a78c7c67a90ddb16.tar.gz |
just-mr utils: Add resolved tree id file getter
Diffstat (limited to 'src/other_tools/just_mr/utils.cpp')
-rw-r--r-- | src/other_tools/just_mr/utils.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/utils.cpp b/src/other_tools/just_mr/utils.cpp index 92563824..57ef6830 100644 --- a/src/other_tools/just_mr/utils.cpp +++ b/src/other_tools/just_mr/utils.cpp @@ -55,6 +55,13 @@ auto GetDistdirTreeIDFile(std::string const& content) noexcept return StorageConfig::BuildRoot() / "distfiles-tree-map" / content; } +auto GetResolvedTreeIDFile(std::string const& tree_hash, + PragmaSpecial const& pragma_special) noexcept + -> std::filesystem::path { + return StorageConfig::BuildRoot() / "special-tree-map" / + kPragmaSpecialInverseMap.at(pragma_special) / tree_hash; +} + auto WriteTreeIDFile(std::filesystem::path const& tree_id_file, std::string const& tree_id) noexcept -> bool { // needs to be done safely, so use the rename trick |