Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346348
D6648.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D6648.diff
View Options
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
@@ -401,11 +401,7 @@
if latest_snapshot_revision:
self.latest_snapshot, self.latest_revision = latest_snapshot_revision
- local_dirname = tempfile.mkdtemp(
- dir=self.temp_directory,
- prefix=TEMPORARY_DIR_PREFIX_PATTERN,
- suffix="-%s" % os.getpid(),
- )
+ local_dirname = self._create_tmp_dir(self.temp_directory)
try:
self.svnrepo = SvnRepo(
@@ -554,6 +550,13 @@
self._last_revision.directory,
)
+ def _create_tmp_dir(self, root_tmp_dir: str) -> str:
+ return tempfile.mkdtemp(
+ dir=root_tmp_dir,
+ prefix=TEMPORARY_DIR_PREFIX_PATTERN,
+ suffix="-%s" % os.getpid(),
+ )
+
class SvnLoaderFromDumpArchive(SvnLoader):
"""Uncompress an archive containing an svn dump, mount the svn dump as a local svn
@@ -641,7 +644,7 @@
check_revision=check_revision,
max_content_size=max_content_size,
)
- self.temp_dir = tempfile.mkdtemp(dir=self.temp_directory)
+ self.temp_dir = self._create_tmp_dir(self.temp_directory)
self.repo_path = None
self.truncated_dump = False
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 3:55 PM (2 w, 22 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3229289
Attached To
D6648: loader: Create temp folder with pattern in SvnLoaderFromRemoteDump
Event Timeline
Log In to Comment