diff options
Diffstat (limited to 'src/hydrilla/proxy/state_impl/repos.py')
-rw-r--r-- | src/hydrilla/proxy/state_impl/repos.py | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/hydrilla/proxy/state_impl/repos.py b/src/hydrilla/proxy/state_impl/repos.py index 2670ae9..d4fbbce 100644 --- a/src/hydrilla/proxy/state_impl/repos.py +++ b/src/hydrilla/proxy/state_impl/repos.py @@ -145,16 +145,6 @@ def sync_remote_repo_definitions(repo_url: str, dest: Path) -> None: item_path.write_bytes(item_response.content) -@dc.dataclass(frozen=True) -class RemoteFileResolver(_operations.FileResolver): - repo_url: str - - def by_sha256(self, sha256: str) -> bytes: - response = requests.get(urljoin(self.repo_url, f'file/sha256/{sha256}')) - assert response.ok - return response.content - - def make_repo_display_info( ref: st.RepoRef, name: str, @@ -290,11 +280,10 @@ class ConcreteRepoRef(st.RepoRef): with tempfile.TemporaryDirectory() as tmpdir_str: tmpdir = Path(tmpdir_str) sync_remote_repo_definitions(repo_url, tmpdir) - new_iteration_id = _operations.load_packages( - cursor, - tmpdir, - int(self.id), - RemoteFileResolver(repo_url) + new_iteration_id = _operations._load_packages_no_state_update( + cursor = cursor, + malcontent_path = tmpdir, + repo_id = int(self.id) ) self.state.rebuild_structures() |