Skip to content

Commit 15be410

Browse files
committed
Merge pull request #2619 from natecook1000/nc-uc-branch
Allow update-checkout to switch to master/stable
2 parents 4a19169 + 2cfa0f8 commit 15be410

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

utils/update-checkout

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@ REPOSITORIES = {
3939
'swift-integration-tests': 'apple/swift-integration-tests',
4040
}
4141

42+
MASTER_BRANCHES = {
43+
'llvm': 'stable',
44+
'clang': 'stable',
45+
'swift': 'master',
46+
'lldb': 'master',
47+
'cmark': 'master',
48+
'llbuild': 'master',
49+
'swiftpm': 'master',
50+
'compiler-rt': 'stable',
51+
'swift-corelibs-xctest': 'master',
52+
'swift-corelibs-foundation': 'master',
53+
'swift-corelibs-libdispatch': 'master',
54+
'swift-integration-tests': 'master',
55+
}
56+
4257
NEXT_BRANCHES = {
4358
'llvm': 'stable-next',
4459
'clang': 'stable-next',
@@ -48,6 +63,7 @@ NEXT_BRANCHES = {
4863
'cmark': 'master',
4964
'llbuild': 'master',
5065
'swiftpm': 'master',
66+
'compiler-rt': 'stable-next',
5167
'swift-corelibs-xctest': 'master',
5268
'swift-corelibs-foundation': 'master',
5369
'swift-corelibs-libdispatch': 'master',
@@ -62,11 +78,11 @@ SWIFT_3_0_PREVIEW_1_BRANCHES = {
6278
'cmark': 'swift-3.0-preview-1-branch',
6379
'llbuild': 'swift-3.0-preview-1-branch',
6480
'swiftpm': 'swift-3.0-preview-1-branch',
81+
'compiler-rt': 'swift-3.0-branch',
6582
'swift-corelibs-xctest': 'swift-3.0-preview-1-branch',
6683
'swift-corelibs-foundation': 'swift-3.0-preview-1-branch',
6784
'swift-corelibs-libdispatch': 'swift-3.0-preview-1-branch',
6885
'swift-integration-tests': 'swift-3.0-preview-1-branch',
69-
'compiler-rt': 'swift-3.0-branch',
7086
}
7187

7288

@@ -111,7 +127,9 @@ def obtain_additional_swift_sources(
111127
check_call(['git', 'clone', '--recursive', remote,
112128
dir_name])
113129
if branch:
114-
if branch == "stable-next" or branch == "master-next":
130+
if branch == "master" or branch == "stable":
131+
repo_branch = MASTER_BRANCHES[dir_name]
132+
elif branch == "stable-next" or branch == "master-next":
115133
repo_branch = NEXT_BRANCHES[dir_name]
116134
elif branch == "swift-3.0-branch" or \
117135
branch == "swift-3.0-preview-1-branch":
@@ -170,7 +188,9 @@ By default, updates your checkouts of Swift, SourceKit, LLDB, and SwiftPM.""")
170188
print("--- Skipping '" + dir_name + "' ---")
171189
continue
172190
if branch:
173-
if branch == "stable-next" or branch == "master-next":
191+
if branch == "master" or branch == "stable":
192+
repo_branch = MASTER_BRANCHES[dir_name]
193+
elif branch == "stable-next" or branch == "master-next":
174194
repo_branch = NEXT_BRANCHES[dir_name]
175195
elif branch == "swift-3.0-branch" or \
176196
branch == "swift-3.0-preview-1-branch":

0 commit comments

Comments
 (0)