commit - f4fe1ade794b94c6b1966a9c13c570d155ae8d01
commit + 66e8444bc467881687c000565173eb3e8afac02d
blob - b8b889eb6b35817016237e12ec5504adaa078fe3
blob + 2fa5124ac854f3d6eeb2b3302b46cd272442e02b
--- swh/loader/git/loader.py
+++ swh/loader/git/loader.py
tags = {}
commits = {}
commit_edges = []
- missing_objects = []
new_trees = []
new_blobs = []
for ref_name, ref_object_hex in self.remote_refs.items():
try:
obj = self.pack[ref_object_hex]
except KeyError:
- missing_objects.append(ref_object_hex)
continue
while obj.type_name == b"tag":
try:
tagged_obj = self.pack[tagged_object_hex]
except KeyError:
- missing_objects.append(tagged_object_hex)
obj = None
break
else:
# Calculate how many more objects we still need to add to the graph.
num_objects_left = self.num_objects - len(tags) - len(commits)
-
- archived_missing_objects = set(
- self.storage.object_find_by_sha1_git(missing_objects).keys()
- )
- if len(archived_missing_objects) != len(missing_objects):
- raise NotFound(
- "Referenced objects found in neither the fetched pack file "
- f"nor in the archive: {set(missing_objects) - archived_missing_objects}"
- )
def add_vertices(new_vertices, object_type):
attributes = dict()