aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools/nightly_revert_checker.py
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2020-06-24 16:27:44 -0700
committerGeorge Burgess <gbiv@chromium.org>2020-06-24 23:44:11 +0000
commit536aff5f6d015f840bafd6ea70774bbc6b3da6f3 (patch)
tree94820359797af86c9a703fd1d27e9547cb81b673 /llvm_tools/nightly_revert_checker.py
parentefb96d1a55f64e72489e219ea65d974e5468a753 (diff)
downloadtoolchain-utils-536aff5f6d015f840bafd6ea70774bbc6b3da6f3.tar.gz
llvm_tools: fix up naming
This replaces `master` with `main` where possible, per the linked bug. Since upstream LLVM has a `master` branch, and there appears to be general support in FOSS for swapping to a different naming convention (`main`), this also makes LLVM's upstream branch name into a constant that we can easily flip if needed. BUG=chromium:1099035 TEST=Unittests Change-Id: I0844cfb4fec00f761e39b0443299daa918fa37ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2265047 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'llvm_tools/nightly_revert_checker.py')
-rwxr-xr-xllvm_tools/nightly_revert_checker.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm_tools/nightly_revert_checker.py b/llvm_tools/nightly_revert_checker.py
index 71b5574b..3a23890a 100755
--- a/llvm_tools/nightly_revert_checker.py
+++ b/llvm_tools/nightly_revert_checker.py
@@ -27,6 +27,7 @@ import typing as t
import cros_utils.email_sender as email_sender
import cros_utils.tiny_render as tiny_render
import get_llvm_hash
+import git_llvm_rev
import revert_checker
State = t.Any
@@ -44,12 +45,12 @@ def _find_interesting_android_shas(
encoding='utf-8',
).strip()
- master_legacy = get_llvm_merge_base('aosp/master-legacy')
+ main_legacy = get_llvm_merge_base('aosp/master-legacy')
testing_upstream = get_llvm_merge_base('aosp/testing-upstream')
- result = [('master-legacy', master_legacy)]
+ result = [('main-legacy', main_legacy)]
# If these are the same SHA, there's no point in tracking both.
- if master_legacy != testing_upstream:
+ if main_legacy != testing_upstream:
result.append(('testing-upstream', testing_upstream))
return result
@@ -270,7 +271,7 @@ def main(argv: t.List[str]) -> None:
for friendly_name, sha in interesting_shas:
logging.info('Finding reverts across %s (%s)', friendly_name, sha)
all_reverts = revert_checker.find_reverts(
- llvm_dir, sha, root='origin/master')
+ llvm_dir, sha, root='origin/' + git_llvm_rev.MAIN_BRANCH)
logging.info('Detected the following revert(s) across %s:\n%s',
friendly_name, pprint.pformat(all_reverts))