Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124146
D8882.id32015.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D8882.id32015.diff
View Options
diff --git a/swh/loader/svn/replay.py b/swh/loader/svn/replay.py
--- a/swh/loader/svn/replay.py
+++ b/swh/loader/svn/replay.py
@@ -464,7 +464,6 @@
peg_rev=copyfrom_rev,
ignore_keywords=True,
overwrite=True,
- ignore_externals=True,
)
self.directory[path_bytes] = from_disk.Directory.from_disk(path=fullpath)
diff --git a/swh/loader/svn/tests/test_externals.py b/swh/loader/svn/tests/test_externals.py
--- a/swh/loader/svn/tests/test_externals.py
+++ b/swh/loader/svn/tests/test_externals.py
@@ -1640,3 +1640,66 @@
type="svn",
)
check_snapshot(loader.snapshot, loader.storage)
+
+
+def test_loader_copyfrom_rev_with_externals(
+ swh_storage, repo_url, external_repo_url, tmp_path
+):
+ add_commit(
+ external_repo_url,
+ "Create some directories and files in an external repository",
+ [
+ CommitChange(
+ change_type=CommitChangeType.AddOrUpdate,
+ path="code/hello/hello-world",
+ data=b"#!/bin/bash\necho Hello World !",
+ ),
+ ],
+ )
+
+ add_commit(
+ repo_url,
+ "Create repository structure, one externals directory with svn:externals"
+ "property set and one trunk directory",
+ [
+ CommitChange(
+ change_type=CommitChangeType.AddOrUpdate,
+ path="externals/",
+ properties={
+ "svn:externals": f'{svn_urljoin(external_repo_url, "code/hello/")} hello' # noqa
+ },
+ ),
+ CommitChange(
+ change_type=CommitChangeType.AddOrUpdate,
+ path="trunk/",
+ ),
+ ],
+ )
+
+ add_commit(
+ repo_url,
+ "Add copy of externals directory to trunk from revision 1.",
+ [
+ CommitChange(
+ change_type=CommitChangeType.AddOrUpdate,
+ path="trunk/externals/",
+ copyfrom_path=repo_url + "/externals",
+ copyfrom_rev=1,
+ ),
+ ],
+ )
+
+ loader = SvnLoader(
+ swh_storage,
+ repo_url,
+ temp_directory=tmp_path,
+ check_revision=1,
+ )
+ assert loader.load() == {"status": "eventful"}
+ assert_last_visit_matches(
+ loader.storage,
+ repo_url,
+ status="full",
+ type="svn",
+ )
+ check_snapshot(loader.snapshot, loader.storage)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 20 2024, 7:23 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3233065
Attached To
D8882: replay: Do not ignore externals in copyfrom operations
Event Timeline
Log In to Comment