From 536aff5f6d015f840bafd6ea70774bbc6b3da6f3 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Wed, 24 Jun 2020 16:27:44 -0700 Subject: 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 Tested-by: George Burgess --- llvm_tools/nightly_revert_checker.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'llvm_tools/nightly_revert_checker.py') 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)) -- cgit v1.2.3