aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools/update_chromeos_llvm_hash.py
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2020-04-01 17:43:39 -0700
committerManoj Gupta <manojgupta@chromium.org>2020-04-02 16:04:36 +0000
commit5a1fd9fb57f00498eb301b5e2c685f0509367e56 (patch)
tree48ae73841a21147530e76341bde53064fc82e3de /llvm_tools/update_chromeos_llvm_hash.py
parentd3c078a39da8d4fabd9d3466311e084ee1783e76 (diff)
downloadtoolchain-utils-5a1fd9fb57f00498eb301b5e2c685f0509367e56.tar.gz
llvm_tools: Add feature to specify a terminating commit message
Allow sepcifying a terminating commit message. This will be useful to specify CL dependency information e.g. "Cq-Depend: chromium:NNN". BUG=chromium:1067029 TEST=unit tests Change-Id: I2dfa751b28f64df50169cd424d39a3f3f4f1de6a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2133241 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'llvm_tools/update_chromeos_llvm_hash.py')
-rwxr-xr-xllvm_tools/update_chromeos_llvm_hash.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/llvm_tools/update_chromeos_llvm_hash.py b/llvm_tools/update_chromeos_llvm_hash.py
index d29b605d..916eb67b 100755
--- a/llvm_tools/update_chromeos_llvm_hash.py
+++ b/llvm_tools/update_chromeos_llvm_hash.py
@@ -616,7 +616,8 @@ def StagePackagesPatchResultsForCommit(package_info_dict, commit_messages):
def UpdatePackages(packages, llvm_variant, git_hash, svn_version, chroot_path,
- patch_metadata_file, mode, git_hash_source):
+ patch_metadata_file, mode, git_hash_source,
+ extra_commit_msg):
"""Updates an LLVM hash and uprevs the ebuild of the packages.
A temporary repo is created for the changes. The changes are
@@ -700,6 +701,9 @@ def UpdatePackages(packages, llvm_variant, git_hash, svn_version, chroot_path,
commit_messages = StagePackagesPatchResultsForCommit(
package_info_dict, commit_messages)
+ if extra_commit_msg:
+ commit_messages.append(extra_commit_msg)
+
change_list = UploadChanges(repo_path, branch, commit_messages)
finally:
@@ -728,9 +732,15 @@ def main():
git_hash, svn_version = GetLLVMHashAndVersionFromSVNOption(git_hash_source)
change_list = UpdatePackages(
- args_output.update_packages, llvm_variant, git_hash, svn_version,
- args_output.chroot_path, args_output.patch_metadata_file,
- FailureModes(args_output.failure_mode), git_hash_source)
+ args_output.update_packages,
+ llvm_variant,
+ git_hash,
+ svn_version,
+ args_output.chroot_path,
+ args_output.patch_metadata_file,
+ FailureModes(args_output.failure_mode),
+ git_hash_source,
+ extra_commit_msg=None)
print('Successfully updated packages to %s (%d)' % (git_hash, svn_version))
print('Gerrit URL: %s' % change_list.url)