From 10c3dd6f59787243559d651540042d9aa4f79c83 Mon Sep 17 00:00:00 2001 From: Edward Lesmes Date: Mon, 8 Feb 2021 21:13:57 +0000 Subject: [PATCH] git-cl: Add support for setting Bot-Commit+1 on upload. Some bots use git-cl to upload changes to Gerrit. Add an option so those can set Bot-Commit+1 on upload instead of TBR and CR+1. Change-Id: I5e80ddadedf6c4fe277f8984c35a603da923de5e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2679780 Commit-Queue: Josip Sokcevic Reviewed-by: Josip Sokcevic Auto-Submit: Edward Lesmes --- git_cl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git_cl.py b/git_cl.py index 0369f16fc..6e7e148d6 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2368,6 +2368,8 @@ class Changelist(object): if options.enable_auto_submit: refspec_opts.append('l=Auto-Submit+1') + if options.set_bot_commit: + refspec_opts.append('l=Bot-Commit+1') if options.use_commit_queue: refspec_opts.append('l=Commit-Queue+2') elif options.cq_dry_run: @@ -4124,6 +4126,8 @@ def CMDupload(parser, args): action='store_true', default=False, help='Send the patchset to do a CQ dry run right after ' 'upload.') + parser.add_option('--set-bot-commit', action='store_true', + help=optparse.SUPPRESS_HELP) parser.add_option('--preserve-tryjobs', action='store_true', help='instruct the CQ to let tryjobs running even after ' 'new patchsets are uploaded instead of canceling '