diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-09-27 12:47:43 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-02 12:06:50 +0100 |
commit | c1a58d73d2fa21f9c692bbe3895443d3afc43d1d (patch) | |
tree | 97e73429004280051e0d02385833bf31ac43fcd4 /src/other_tools/root_maps/fpath_git_map.cpp | |
parent | ff6c747e10848ce5c5846f880dfd649896a5268b (diff) | |
download | justbuild-c1a58d73d2fa21f9c692bbe3895443d3afc43d1d.tar.gz |
Decoupling symlinks map and CAS utilities from just-mr
This is required in order to make them available to 'just serve'
in a minimal just installation.
Diffstat (limited to 'src/other_tools/root_maps/fpath_git_map.cpp')
-rw-r--r-- | src/other_tools/root_maps/fpath_git_map.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/other_tools/root_maps/fpath_git_map.cpp b/src/other_tools/root_maps/fpath_git_map.cpp index 563876ff..9f545856 100644 --- a/src/other_tools/root_maps/fpath_git_map.cpp +++ b/src/other_tools/root_maps/fpath_git_map.cpp @@ -18,6 +18,7 @@ #include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/git_repo.hpp" #include "src/buildtool/storage/config.hpp" +#include "src/buildtool/storage/fs_utils.hpp" #include "src/other_tools/git_operations/git_repo_remote.hpp" #include "src/utils/cpp/tmp_dir.hpp" @@ -36,7 +37,7 @@ void ResolveFilePathTree( if (pragma_special) { // get the resolved tree auto tree_id_file = - JustMR::Utils::GetResolvedTreeIDFile(tree_hash, *pragma_special); + StorageUtils::GetResolvedTreeIDFile(tree_hash, *pragma_special); if (FileSystemManager::Exists(tree_id_file)) { // read resolved tree id auto resolved_tree_id = FileSystemManager::ReadFile(tree_id_file); @@ -90,8 +91,8 @@ void ResolveFilePathTree( } auto const& resolved_tree = *hashes[0]; // cache the resolved tree in the CAS map - if (not JustMR::Utils::WriteTreeIDFile(tree_id_file, - resolved_tree.id)) { + if (not StorageUtils::WriteTreeIDFile(tree_id_file, + resolved_tree.id)) { (*logger)(fmt::format("Failed to write resolved tree " "id to file {}", tree_id_file.string()), @@ -255,7 +256,7 @@ auto CreateFilePathGitMap( /*fatal=*/false); } // it's not a git repo, so import it to git cache - auto tmp_dir = JustMR::Utils::CreateTypedTmpDir("file"); + auto tmp_dir = StorageUtils::CreateTypedTmpDir("file"); if (not tmp_dir) { (*logger)("Failed to create import-to-git tmp directory!", /*fatal=*/true); |