|
|
@@ -271,18 +271,20 @@ class Git(codearchiver.core.Module): |
|
|
|
|
|
|
|
# Bundling completed without issues; wait for depended-on bundles, add them to the metadata, then replace own temporary metadata |
|
|
|
if self._storage: |
|
|
|
self._storage.wait_temporary_metadata(tmpMetadataDependencies) |
|
|
|
if tmpMetadataDependencies: |
|
|
|
self._storage.wait_temporary_metadata(tmpMetadataDependencies) |
|
|
|
with self._storage.lock(): |
|
|
|
criteria = [('Module', type(self).name), ('Root commit', tuple(rootCommits)), ('Object', tuple(baseInProgressObjects))] |
|
|
|
missingObjects = baseInProgressObjects.copy() |
|
|
|
for oldBundleName, oldObjects, oldOids in self._find_storage_bundles(criteria, {value.split(' ', 1)[0] for value in baseInProgressObjects}): |
|
|
|
metadata.append('Based on bundle', oldBundleName) |
|
|
|
baseOids |= oldOids |
|
|
|
missingObjects -= oldObjects |
|
|
|
|
|
|
|
# Verification: all commit/tag objects collected from temporary metadata must be covered |
|
|
|
if missingObjects: |
|
|
|
raise RuntimeError('Resolved temporary metadata bundles do not cover all expected objects') |
|
|
|
if tmpMetadataDependencies: |
|
|
|
criteria = [('Module', type(self).name), ('Root commit', tuple(rootCommits)), ('Object', tuple(baseInProgressObjects))] |
|
|
|
missingObjects = baseInProgressObjects.copy() |
|
|
|
for oldBundleName, oldObjects, oldOids in self._find_storage_bundles(criteria, {value.split(' ', 1)[0] for value in baseInProgressObjects}): |
|
|
|
metadata.append('Based on bundle', oldBundleName) |
|
|
|
baseOids |= oldOids |
|
|
|
missingObjects -= oldObjects |
|
|
|
|
|
|
|
# Verification: all commit/tag objects collected from temporary metadata must be covered |
|
|
|
if missingObjects: |
|
|
|
raise RuntimeError('Resolved temporary metadata bundles do not cover all expected objects') |
|
|
|
|
|
|
|
# Verification: all objects in the clone are either in a base bundle or in the index |
|
|
|
# This can only be done here because all oids are needed, not just the commit/tag objects |
|
|
|