Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/svn/tests/test_externals.py
Show First 20 Lines • Show All 1,634 Lines • ▼ Show 20 Lines | ): | ||||
assert loader.load() == {"status": "eventful"} | assert loader.load() == {"status": "eventful"} | ||||
assert_last_visit_matches( | assert_last_visit_matches( | ||||
loader.storage, | loader.storage, | ||||
repo_url, | repo_url, | ||||
status="full", | status="full", | ||||
type="svn", | type="svn", | ||||
) | ) | ||||
check_snapshot(loader.snapshot, loader.storage) | 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"} | |||||
ardumont: what happened in this test initially (without the runtime code change)? | |||||
anlambertAuthorUnsubmitted Done Inline Actionstrunk/externals/hello directory was not exported while it must be anlambert: `trunk/externals/hello` directory was not exported while it must be | |||||
assert_last_visit_matches( | |||||
loader.storage, | |||||
repo_url, | |||||
status="full", | |||||
type="svn", | |||||
) | |||||
check_snapshot(loader.snapshot, loader.storage) |
what happened in this test initially (without the runtime code change)?