Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/pypi/loader.py
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | def _known_artifacts(self, last_snapshot): | ||||
return ret | return ret | ||||
def _last_snapshot(self): | def _last_snapshot(self): | ||||
"""Retrieve the last snapshot | """Retrieve the last snapshot | ||||
""" | """ | ||||
snapshot = self.storage.snapshot_get_latest(self.origin_id) | snapshot = self.storage.snapshot_get_latest(self.origin_id) | ||||
if snapshot and snapshot.pop('next_branch', None): | if snapshot and snapshot.pop('next_branch', None): | ||||
return snapshot_get_all_branches(self.storage, snapshot['id']) | snapshot = snapshot_get_all_branches(self.storage, snapshot['id']) | ||||
return snapshot | |||||
def prepare(self, project_name, project_url, | def prepare(self, project_name, project_url, | ||||
project_metadata_url=None): | project_metadata_url=None): | ||||
"""Keep reference to the origin url (project) and the | """Keep reference to the origin url (project) and the | ||||
project metadata url | project metadata url | ||||
Args: | Args: | ||||
project_name (str): Project's simple name | project_name (str): Project's simple name | ||||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |