aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools/patch_sync/src/main.rs
diff options
context:
space:
mode:
authorJordan R Abrahams <ajordanr@google.com>2022-02-04 01:29:03 +0000
committerCommit Bot <commit-bot@chromium.org>2022-02-04 21:06:38 +0000
commit3527566c2b13b4977e10281a1cf62b07f1242be0 (patch)
tree17b75409f67610782bf336766c84605a5f3c6c7f /llvm_tools/patch_sync/src/main.rs
parent82ea0615fe9f6438df4669f17e4f31808788f019 (diff)
downloadtoolchain-utils-3527566c2b13b4977e10281a1cf62b07f1242be0.tar.gz
patch_sync: Sort android patches
Android requests that patches are sorted. They use their own __lt__ implementation in cherrypick_cl.py, which we should leverage to keep the sorting stable and robust to implementation details. BUG=b:217767120 TEST=patch_sync transpose <...> Change-Id: I3013b66c4552fd47052e15009df252cdcdc245ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3440375 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Pirama Arumuga Nainar <pirama@google.com> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Diffstat (limited to 'llvm_tools/patch_sync/src/main.rs')
-rw-r--r--llvm_tools/patch_sync/src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm_tools/patch_sync/src/main.rs b/llvm_tools/patch_sync/src/main.rs
index a8a957f9..58276151 100644
--- a/llvm_tools/patch_sync/src/main.rs
+++ b/llvm_tools/patch_sync/src/main.rs
@@ -228,6 +228,12 @@ fn modify_repos(ctx: &RepoSetupContext, no_commit: bool, opt: ModifyOpt) -> Resu
.context("uploading chromiumos changes")?;
}
if !opt.new_cros_patches.is_empty() {
+ if let Err(e) = android_utils::sort_android_patches(&ctx.android_checkout) {
+ eprintln!(
+ "Couldn't sort Android patches; continuing. Caused by: {}",
+ e
+ );
+ }
ctx.android_repo_upload(&opt.android_reviewers)
.context("uploading android changes")?;
}