Skip to content

Commit e9c2aa8

Browse files
committed
[update-checkout] Perform following rename: config['repositories'][repo]['{name,remote-repo-name}']
This makes it absolutely clear when reading the config file that this is a name on the remote server.
1 parent 74b9206 commit e9c2aa8

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

utils/update-checkout

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def obtain_additional_swift_sources(
7878
with shell.pushd(SWIFT_SOURCE_ROOT, dry_run=False,
7979
echo=False):
8080
for dir_name, repo_info in config['repositories'].items():
81-
repo = repo_info['name']
8281
if dir_name in skip_repositories:
8382
print("--- Skipping '" + dir_name + "' ---")
8483
continue
@@ -92,10 +91,13 @@ def obtain_additional_swift_sources(
9291
# interpolating.
9392
if 'url' in repo_info:
9493
remote = repo_info['url']
95-
elif with_ssh is True or 'https-clone-pattern' not in config:
96-
remote = config['ssh-clone-pattern'] % repo
9794
else:
98-
remote = config['https-clone-pattern'] % repo
95+
remote_repo_name = repo_info['remote-repo-name']
96+
if with_ssh is True or 'https-clone-pattern' not in config:
97+
remote = config['ssh-clone-pattern'] % remote_repo_name
98+
else:
99+
remote = config['https-clone-pattern'] % remote_repo_name
100+
99101
if skip_history:
100102
shell.call(['git', 'clone', '--recursive', '--depth', '1',
101103
remote, dir_name], echo=False)

utils/update-checkout-config.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
"ssh-clone-pattern": "[email protected]:%s.git",
33
"https-clone-pattern": "https://github.com/%s.git",
44
"repositories" : {
5-
"llvm": { "name": "apple/swift-llvm" },
6-
"clang": { "name": "apple/swift-clang" },
7-
"swift": { "name": "apple/swift-swift" },
8-
"lldb": { "name": "apple/swift-lldb" },
9-
"cmark": { "name": "apple/swift-cmark" },
10-
"llbuild": { "name": "apple/swift-llbuild" },
11-
"swiftpm": { "name": "apple/swift-package-manager" },
12-
"compiler-rt": { "name": "apple/swift-compiler-rt" },
13-
"swift-corelibs-xctest": { "name": "apple/swift-corelibs-xctest" },
14-
"swift-corelibs-foundation": { "name": "apple/swift-corelibs-foundation" },
15-
"swift-corelibs-libdispatch": { "name": "apple/swift-corelibs-libdispatch" },
16-
"swift-integration-tests": { "name": "apple/swift-integration-tests" }
5+
"llvm": { "remote-repo-name": "apple/swift-llvm" },
6+
"clang": { "remote-repo-name": "apple/swift-clang" },
7+
"swift": { "remote-repo-name": "apple/swift-swift" },
8+
"lldb": { "remote-repo-name": "apple/swift-lldb" },
9+
"cmark": { "remote-repo-name": "apple/swift-cmark" },
10+
"llbuild": { "remote-repo-name": "apple/swift-llbuild" },
11+
"swiftpm": { "remote-repo-name": "apple/swift-package-manager" },
12+
"compiler-rt": { "remote-repo-name": "apple/swift-compiler-rt" },
13+
"swift-corelibs-xctest": { "remote-repo-name": "apple/swift-corelibs-xctest" },
14+
"swift-corelibs-foundation": { "remote-repo-name": "apple/swift-corelibs-foundation" },
15+
"swift-corelibs-libdispatch": { "remote-repo-name": "apple/swift-corelibs-libdispatch" },
16+
"swift-integration-tests": { "remote-repo-name": "apple/swift-integration-tests" }
1717
},
1818
"branch-names": ["master-branches", "next-branches", "swift-3.0-preview-1-branches", "swift-3.0-preview-2-branches"],
1919
"default-branch-alias": "master",

0 commit comments

Comments
 (0)