Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/svn/loader.py
Show First 20 Lines • Show All 577 Lines • ▼ Show 20 Lines | class SvnLoaderFromDumpArchive(SvnLoader): | ||||
def prepare(self): | def prepare(self): | ||||
self.log.info("Archive to mount and load %s" % self.archive_path) | self.log.info("Archive to mount and load %s" % self.archive_path) | ||||
self.temp_dir, self.repo_path = init_svn_repo_from_archive_dump( | self.temp_dir, self.repo_path = init_svn_repo_from_archive_dump( | ||||
self.archive_path, | self.archive_path, | ||||
prefix=TEMPORARY_DIR_PREFIX_PATTERN, | prefix=TEMPORARY_DIR_PREFIX_PATTERN, | ||||
suffix="-%s" % os.getpid(), | suffix="-%s" % os.getpid(), | ||||
root_dir=self.temp_directory, | root_dir=self.temp_directory, | ||||
) | ) | ||||
self.svn_url = f"file://{self.repo_path}" | |||||
super().prepare() | super().prepare() | ||||
def cleanup(self): | def cleanup(self): | ||||
super().cleanup() | super().cleanup() | ||||
if self.temp_dir and os.path.exists(self.temp_dir): | if self.temp_dir and os.path.exists(self.temp_dir): | ||||
msg = "Clean up temporary directory dump %s for project %s" % ( | msg = "Clean up temporary directory dump %s for project %s" % ( | ||||
self.temp_dir, | self.temp_dir, | ||||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |