@@ -58,7 +58,7 @@ def update_single_repository(repo_path, branch):
58
58
59
59
def update_all_repositories (args , config , scheme_name ):
60
60
repo_branch = scheme_name
61
- for repo_name in config ["repositories" ].keys ():
61
+ for repo_name in config ['repos' ].keys ():
62
62
if repo_name in args .skip_repository :
63
63
print ("--- Skipping '" + repo_name + "' ---" )
64
64
continue
@@ -81,45 +81,46 @@ def obtain_additional_swift_sources(
81
81
config , with_ssh , scheme_name , skip_history , skip_repositories ):
82
82
with shell .pushd (SWIFT_SOURCE_ROOT , dry_run = False ,
83
83
echo = False ):
84
- for dir_name , repo_info in config ['repositories ' ].items ():
85
- if dir_name in skip_repositories :
86
- print ("--- Skipping '" + dir_name + "' ---" )
84
+ for repo_name , repo_info in config ['repos ' ].items ():
85
+ if repo_name in skip_repositories :
86
+ print ("--- Skipping '" + repo_name + "' ---" )
87
87
continue
88
88
89
- if os .path .isdir (os .path .join (dir_name , ".git" )):
89
+ if os .path .isdir (os .path .join (repo_name , ".git" )):
90
90
continue
91
91
92
- print ("--- Cloning '" + dir_name + "' ---" )
92
+ print ("--- Cloning '" + repo_name + "' ---" )
93
93
94
94
# If we have a url override, use that url instead of
95
95
# interpolating.
96
- if 'url' in repo_info :
97
- remote = repo_info ['url' ]
96
+ remote_repo_info = repo_info ['remote' ]
97
+ if 'url' in remote_repo_info :
98
+ remote = remote_repo_info ['url' ]
98
99
else :
99
- remote_repo_name = repo_info [ 'remote-repo-name ' ]
100
+ remote_repo_id = remote_repo_info [ 'id ' ]
100
101
if with_ssh is True or 'https-clone-pattern' not in config :
101
- remote = config ['ssh-clone-pattern' ] % remote_repo_name
102
+ remote = config ['ssh-clone-pattern' ] % remote_repo_id
102
103
else :
103
- remote = config ['https-clone-pattern' ] % remote_repo_name
104
+ remote = config ['https-clone-pattern' ] % remote_repo_id
104
105
105
106
if skip_history :
106
107
shell .call (['git' , 'clone' , '--recursive' , '--depth' , '1' ,
107
- remote , dir_name ], echo = False )
108
+ remote , repo_name ], echo = False )
108
109
else :
109
110
shell .call (['git' , 'clone' , '--recursive' , remote ,
110
- dir_name ], echo = False )
111
+ repo_name ], echo = False )
111
112
if scheme_name :
112
113
for v in config ['branch-schemes' ].values ():
113
114
if scheme_name not in v ['aliases' ]:
114
115
continue
115
- repo_branch = v ['repos' ][dir_name ]
116
+ repo_branch = v ['repos' ][repo_name ]
116
117
break
117
118
else :
118
119
repo_branch = scheme_name
119
- src_path = os .path .join (SWIFT_SOURCE_ROOT , dir_name ,
120
+ src_path = os .path .join (SWIFT_SOURCE_ROOT , repo_name ,
120
121
".git" )
121
122
shell .call (['git' , '--git-dir' , src_path , '--work-tree' ,
122
- os .path .join (SWIFT_SOURCE_ROOT , dir_name ),
123
+ os .path .join (SWIFT_SOURCE_ROOT , repo_name ),
123
124
'checkout' , repo_branch ], echo = False )
124
125
125
126
0 commit comments