Skip to content

Commit 421c62e

Browse files
committed
[update_checkout] Only --match-timestamp with @swift-ci merges on some repos
1 parent 43aa9af commit 421c62e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

utils/update_checkout.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,15 @@ def confirm_tag_in_repo(tag, repo_name):
4242
def find_rev_by_timestamp(timestamp, repo_name, refspec):
4343
base_args = ["git", "log", "-1", "--format=%H",
4444
'--before=' + timestamp]
45-
# Prefer the most-recent change _made by swift-ci_ before the timestamp,
46-
# falling back to most-recent in general if there is none by swift-ci.
47-
rev = shell.capture(base_args + ['--author', 'swift-ci', refspec]).strip()
48-
if rev:
49-
return rev
45+
# On repos with regular batch-automerges from swift-ci -- namely clang,
46+
# llvm and lldb -- prefer the most-recent change _made by swift-ci_
47+
# before the timestamp, falling back to most-recent in general if there
48+
# is none by swift-ci.
49+
if repo_name in ["llvm", "clang", "lldb"]:
50+
rev = shell.capture(base_args +
51+
['--author', 'swift-ci', refspec]).strip()
52+
if rev:
53+
return rev
5054
rev = shell.capture(base_args + [refspec]).strip()
5155
if rev:
5256
return rev

0 commit comments

Comments
 (0)