diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -3,4 +3,4 @@ swh.model >= 0.3 swh.objstorage >= 0.0.17 swh.scheduler >= 0.7.0 -swh.storage >= 0.0.106 +swh.storage >= 0.29.0 diff --git a/swh/vault/cookers/git_bare.py b/swh/vault/cookers/git_bare.py --- a/swh/vault/cookers/git_bare.py +++ b/swh/vault/cookers/git_bare.py @@ -25,6 +25,7 @@ from typing import Any, Dict, Iterable, List, Set import zlib +from swh.core.api.classes import stream_results from swh.graph.client import GraphArgumentException from swh.model import identifiers from swh.model.hashutil import hash_to_bytehex, hash_to_hex @@ -251,7 +252,10 @@ def load_directory(self, obj_id: Sha1Git) -> None: # Load the directory - entries = list(self.storage.directory_ls(obj_id, recursive=False)) + entries = [ + entry.to_dict() + for entry in stream_results(self.storage.directory_get_entries, obj_id) + ] directory = {"id": obj_id, "entries": entries} git_object = identifiers.directory_git_object(directory) self.write_object(obj_id, git_object)