Skip to content
Snippets Groups Projects

Fix revision cooking errors with the vault for large revision log

2 unresolved threads
Compare and
3 files
+ 53
4
Compare changes
  • Side-by-side
  • Inline
Files
3
# Copyright (C) 2016-2017 The Software Heritage developers
# Copyright (C) 2016-2019 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
@@ -9,6 +9,7 @@ from pathlib import Path
from swh.model import hashutil
from swh.vault.cookers.base import BaseVaultCooker
from swh.vault.cookers.utils import revision_log
from swh.vault.to_disk import DirectoryBuilder
@@ -22,7 +23,7 @@ class RevisionFlatCooker(BaseVaultCooker):
def prepare_bundle(self):
with tempfile.TemporaryDirectory(prefix='tmp-vault-revision-') as td:
root = Path(td)
for revision in self.storage.revision_log([self.obj_id]):
for revision in revision_log(self.storage, self.obj_id):
revdir = root / hashutil.hash_to_hex(revision['id'])
revdir.mkdir()
directory_builder = DirectoryBuilder(
Loading