@@ -268,7 +268,19 @@ def update_single_repository(pool_args):
268
268
269
269
270
270
def get_timestamp_to_match (match_timestamp , source_root ):
271
- # type: (str, str) -> str | None
271
+ # type: (str | None, str) -> str | None
272
+ """Computes a timestamp of the last commit on the current branch in
273
+ the `swift` repository.
274
+
275
+ Args:
276
+ match_timestamp (str | None): value of `--match-timestamp` to check.
277
+ source_root (str): directory that contains sources of the Swift project.
278
+
279
+ Returns:
280
+ str | None: a timestamp of the last commit of `swift` repository if
281
+ `match_timestamp` argument has a value, `None` if `match_timestamp` is
282
+ falsy.
283
+ """
272
284
if not match_timestamp :
273
285
return None
274
286
with shell .pushd (os .path .join (source_root , "swift" ),
@@ -511,16 +523,22 @@ def full_target_name(repository, target):
511
523
raise RuntimeError ('Cannot determine if %s is a branch or a tag' % target )
512
524
513
525
514
- def skip_list_for_platform (config ):
515
- """Computes a list of repositories to skip when updating or cloning.
526
+ def skip_list_for_platform (config , all_repos ):
527
+ """Computes a list of repositories to skip when updating or cloning, if not
528
+ overriden by `--all-repositories` CLI argument.
516
529
517
530
Args:
518
531
config (Dict[str, Any]): deserialized `update-checkout-config.json`
532
+ all_repos (List[str]): repositories not required for current platform.
519
533
520
534
Returns:
521
- List[str]: a resulting list of repositories to skip.
535
+ List[str]: a resulting list of repositories to skip or empty list if
536
+ `all_repos` is not empty.
522
537
"""
523
538
539
+ if all_repos :
540
+ return [] # Do not skip any platform-specific repositories
541
+
524
542
# If there is a platforms key only include the repo if the
525
543
# platform is in the list
526
544
skip_list = []
@@ -647,6 +665,7 @@ def main():
647
665
skip_tags = args .skip_tags
648
666
scheme_name = args .scheme
649
667
github_comment = args .github_comment
668
+ all_repos = args .all_repositories
650
669
651
670
with open (args .config ) as f :
652
671
config = json .load (f )
@@ -669,7 +688,7 @@ def main():
669
688
670
689
clone_results = None
671
690
if clone or clone_with_ssh :
672
- skip_repo_list = skip_list_for_platform (config )
691
+ skip_repo_list = skip_list_for_platform (config , all_repos )
673
692
skip_repo_list .extend (args .skip_repository_list )
674
693
clone_results = obtain_all_additional_swift_sources (args , config ,
675
694
clone_with_ssh ,
0 commit comments