-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boostrap.py: only look for merges by bors
Only look for commits by bors that are merge commits, because those are the only ones with CI artifacts. Also, use `--first-parent` to avoid traversing stuff like rollup branches.
- Loading branch information
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -464,7 +464,7 @@ def download_toolchain(self, stage0=True, rustc_channel=None): | |
# LLVM more often than necessary. | ||
# | ||
# This git command finds that commit SHA, looking for bors-authored | ||
# commits that modified src/llvm-project or other relevant version | ||
# merges that modified src/llvm-project or other relevant version | ||
# stamp files. | ||
# | ||
# This works even in a repository that has not yet initialized | ||
|
@@ -474,7 +474,7 @@ def download_toolchain(self, stage0=True, rustc_channel=None): | |
]).decode(sys.getdefaultencoding()).strip() | ||
llvm_sha = subprocess.check_output([ | ||
"git", "rev-list", "[email protected]", "-n1", | ||
"--first-parent", "HEAD", | ||
"--merges", "--first-parent", "HEAD", | ||
"--", | ||
"{}/src/llvm-project".format(top_level), | ||
"{}/src/bootstrap/download-ci-llvm-stamp".format(top_level), | ||
|
@@ -666,7 +666,10 @@ def maybe_download_ci_toolchain(self): | |
|
||
# Look for a version to compare to based on the current commit. | ||
# Only commits merged by bors will have CI artifacts. | ||
merge_base = ["git", "rev-list", "[email protected]", "-n1", "HEAD"] | ||
merge_base = [ | ||
"git", "rev-list", "[email protected]", "-n1", | ||
"--merges", "--first-parent", "HEAD" | ||
] | ||
commit = subprocess.check_output(merge_base, universal_newlines=True).strip() | ||
|
||
# Warn if there were changes to the compiler or standard library since the ancestor commit. | ||
|