Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/git/loader.py
Show First 20 Lines • Show All 373 Lines • ▼ Show 20 Lines | def get_content_ids(self): | ||||
for raw_obj in self.get_inflater(): | for raw_obj in self.get_inflater(): | ||||
if raw_obj.type_name != b'blob': | if raw_obj.type_name != b'blob': | ||||
continue | continue | ||||
yield converters.dulwich_blob_to_content_id(raw_obj) | yield converters.dulwich_blob_to_content_id(raw_obj) | ||||
def get_contents(self): | def get_contents(self): | ||||
"""Format the blobs from the git repository as swh contents""" | """Format the blobs from the git repository as swh contents""" | ||||
max_content_size = self.config['content_size_limit'] | max_content_size = self.config['max_content_size'] | ||||
missing_contents = set(self.storage.content_missing( | missing_contents = set(self.storage.content_missing( | ||||
self.get_content_ids(), 'sha1_git')) | self.get_content_ids(), 'sha1_git')) | ||||
for raw_obj in self.get_inflater(): | for raw_obj in self.get_inflater(): | ||||
if raw_obj.type_name != b'blob': | if raw_obj.type_name != b'blob': | ||||
continue | continue | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |