diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,4 +1,4 @@ swh.storage >= 0.0.178 swh.model >= 0.0.60 swh.scheduler >= 0.0.39 -swh.loader.core >= 0.0.85 +swh.loader.core >= 0.1.0 diff --git a/swh/loader/svn/loader.py b/swh/loader/svn/loader.py --- a/swh/loader/svn/loader.py +++ b/swh/loader/svn/loader.py @@ -15,7 +15,7 @@ from mmap import mmap, ACCESS_WRITE from subprocess import Popen -from typing import Iterator, List, Optional, Tuple +from typing import Iterator, List, Tuple from swh.model import hashutil from swh.model.model import ( @@ -24,7 +24,6 @@ Origin, SkippedContent, Revision, - Sha1Git, Snapshot, SnapshotBranch, TargetType, @@ -534,9 +533,6 @@ self._revisions.append(rev) return True # next svn revision - def get_snapshot_id(self) -> Optional[Sha1Git]: - return self.snapshot.id if self.snapshot else None - def store_data(self): """We store the data accumulated in internal instance variable. If the iteration over the svn revisions is done, we create the @@ -555,6 +551,7 @@ revision=self._last_revision, snapshot=self._snapshot ) self.flush() + self.loaded_snapshot_id = self.snapshot.id # reset internal state for next iteration self._revisions = []