Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/cvs/loader.py
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | def __init__( | ||||
storage: StorageInterface, | storage: StorageInterface, | ||||
url: str, | url: str, | ||||
origin_url: Optional[str] = None, | origin_url: Optional[str] = None, | ||||
visit_date: Optional[datetime] = None, | visit_date: Optional[datetime] = None, | ||||
cvsroot_path: Optional[str] = None, | cvsroot_path: Optional[str] = None, | ||||
temp_directory: str = "/tmp", | temp_directory: str = "/tmp", | ||||
**kwargs: Any, | **kwargs: Any, | ||||
): | ): | ||||
self.cvsroot_url = url | self.cvsroot_url = url.rstrip("/") | ||||
# origin url as unique identifier for origin in swh archive | # origin url as unique identifier for origin in swh archive | ||||
origin_url = origin_url if origin_url else self.cvsroot_url | origin_url = origin_url.rstrip("/") if origin_url else self.cvsroot_url | ||||
super().__init__(storage=storage, origin_url=origin_url, **kwargs) | super().__init__(storage=storage, origin_url=origin_url, **kwargs) | ||||
self.temp_directory = temp_directory | self.temp_directory = temp_directory | ||||
# internal state used to store swh objects | # internal state used to store swh objects | ||||
self._contents: List[Content] = [] | self._contents: List[Content] = [] | ||||
self._skipped_contents: List[SkippedContent] = [] | self._skipped_contents: List[SkippedContent] = [] | ||||
self._directories: List[Directory] = [] | self._directories: List[Directory] = [] | ||||
self._revisions: List[Revision] = [] | self._revisions: List[Revision] = [] | ||||
▲ Show 20 Lines • Show All 549 Lines • Show Last 20 Lines |