@@ -64,18 +64,18 @@ def obtain_additional_swift_sources(
64
64
echo = False ):
65
65
if not os .path .isdir (os .path .join (dir_name , ".git" )):
66
66
print ("--- Cloning '" + dir_name + "' ---" )
67
- if with_ssh is True or "https_clone_pattern" not in config :
68
- remote = config ["ssh_clone_pattern" ] % repo
67
+ if with_ssh is True or 'https-clone-pattern' not in config :
68
+ remote = config ['ssh-clone-pattern' ] % repo
69
69
else :
70
- remote = config ["https_clone_pattern" ] % repo
70
+ remote = config ['https-clone-pattern' ] % repo
71
71
if skip_history :
72
72
shell .call (['git' , 'clone' , '--recursive' , '--depth' , '1' ,
73
73
remote , dir_name ], echo = False )
74
74
else :
75
75
shell .call (['git' , 'clone' , '--recursive' , remote ,
76
76
dir_name ], echo = False )
77
77
if branch :
78
- for config_branch_name in config ['branch_names ' ]:
78
+ for config_branch_name in config ['branch-names ' ]:
79
79
if branch not in config [config_branch_name ]['aliases' ]:
80
80
continue
81
81
repo_branch = \
@@ -91,9 +91,9 @@ def obtain_additional_swift_sources(
91
91
92
92
93
93
def validate_config (config ):
94
- # Make sure that our branch_names are unique.
95
- if len (config ['branch_names ' ]) != len (set (config ['branch_names ' ])):
96
- raise RuntimeError ('Configuration file has duplicate \' branch_names \' ' )
94
+ # Make sure that our branch-names are unique.
95
+ if len (config ['branch-names ' ]) != len (set (config ['branch-names ' ])):
96
+ raise RuntimeError ('Configuration file has duplicate \' branch-names \' ' )
97
97
98
98
# Then make sure the alias names used by our branches are unique.
99
99
#
@@ -102,7 +102,7 @@ def validate_config(config):
102
102
# the union of the sets. We have uniqueness if the length of the union
103
103
# equals the length of the sum of the counts.
104
104
data = [(len (config [branch ]['aliases' ]), set (config [branch ]['aliases' ]))
105
- for branch in config ['branch_names ' ]]
105
+ for branch in config ['branch-names ' ]]
106
106
result = reduce (lambda acc , x : (acc [0 ] + x [0 ], acc [1 ] | x [1 ]), data ,
107
107
(0 , set ([])))
108
108
if result [0 ] == len (result [1 ]):
@@ -168,7 +168,7 @@ By default, updates your checkouts of Swift, SourceKit, LLDB, and SwiftPM.""")
168
168
print ("--- Skipping '" + dir_name + "' ---" )
169
169
continue
170
170
if branch :
171
- for config_branch_name in config ['branch_names ' ]:
171
+ for config_branch_name in config ['branch-names ' ]:
172
172
if branch not in config [config_branch_name ]['aliases' ]:
173
173
continue
174
174
repo_branch = config [config_branch_name ]['repos' ][dir_name ]
0 commit comments