aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools/get_llvm_hash.py
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2019-09-06 00:49:02 -0700
committerGeorge Burgess <gbiv@chromium.org>2019-09-10 01:58:41 +0000
commitdf367da3e784c3e2f69d2f2f8aaa5457426e0414 (patch)
treeaa54ce7c5c78e64ff38764c59caddf67b63df601 /llvm_tools/get_llvm_hash.py
parentfc0b318753e23bc669121b3f7b7e132a96a7ac6c (diff)
downloadtoolchain-utils-df367da3e784c3e2f69d2f2f8aaa5457426e0414.tar.gz
llvm_tools: teach patch updating logic about google3-unstable
This CL lets us use the new google3-unstable option from update_chromeos_llvm_next_hash.py. It also includes some formatting changes forced by `yapf`. BUG=chromium:914081 TEST=Unittests have no new failures; ran the script with google3-unstable, and it appeared to parse. Change-Id: Ib70e238b383e91dfa7c7df04d716e7127402f68a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1793907 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'llvm_tools/get_llvm_hash.py')
-rwxr-xr-xllvm_tools/get_llvm_hash.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm_tools/get_llvm_hash.py b/llvm_tools/get_llvm_hash.py
index 3ac12add..51cbe40a 100755
--- a/llvm_tools/get_llvm_hash.py
+++ b/llvm_tools/get_llvm_hash.py
@@ -25,7 +25,7 @@ import requests
_LLVM_GIT_URL = ('https://chromium.googlesource.com/external/github.com/llvm'
'/llvm-project')
-_KNOWN_HASH_SOURCES = {'google3', 'google3-unstable', 'tot'}
+KNOWN_HASH_SOURCES = {'google3', 'google3-unstable', 'tot'}
@contextmanager
@@ -160,7 +160,7 @@ def is_svn_option(svn_option):
ValueError: Invalid svn option provided.
"""
- if svn_option.lower() in _KNOWN_HASH_SOURCES:
+ if svn_option.lower() in KNOWN_HASH_SOURCES:
return svn_option.lower()
try:
@@ -410,7 +410,7 @@ def main():
type=is_svn_option,
required=True,
help='which git hash of LLVM to find. Either a svn revision, or one '
- 'of %s' % sorted(_KNOWN_HASH_SOURCES))
+ 'of %s' % sorted(KNOWN_HASH_SOURCES))
# Parse command-line arguments.
args_output = parser.parse_args()