diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,4 +1,4 @@ swh.model >= 0.4.0 -swh.storage >= 0.12.0 +swh.storage >= 0.22.0 swh.scheduler >= 0.0.39 -swh.loader.core >= 0.5.9 +swh.loader.core >= 0.16.0 diff --git a/swh/loader/mercurial/loader.py b/swh/loader/mercurial/loader.py --- a/swh/loader/mercurial/loader.py +++ b/swh/loader/mercurial/loader.py @@ -170,14 +170,10 @@ if isinstance(visit_date, str): # visit_date can be string or datetime visit_date = parser.parse(visit_date) self.visit_date = visit_date - visit_and_status = origin_get_latest_visit_status( + visit_status = origin_get_latest_visit_status( self.storage, self.origin_url, require_snapshot=True ) - if visit_and_status is None: - self.last_snapshot_id = None - else: - _, visit_status = visit_and_status - self.last_snapshot_id = visit_status.snapshot + self.last_snapshot_id = None if visit_status is None else visit_status.snapshot @staticmethod def clone_with_timeout(log, origin, destination, timeout):