From f53f82cbc80ceb7e1325ac295ed3b3e297b32948 Mon Sep 17 00:00:00 2001 From: Stephen Martinis Date: Fri, 7 Sep 2018 20:58:05 +0000 Subject: [PATCH] `git cl split`: Fix typos in cq_dry_run code Bug: 878117 Change-Id: Ifb8af6bfcc6467ad9b79cf6292ebb8afc8f7e949 Reviewed-on: https://chromium-review.googlesource.com/1213588 Reviewed-by: John Budorick Reviewed-by: Ryan Tseng Commit-Queue: Stephen Martinis --- split_cl.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/split_cl.py b/split_cl.py index 05c682e1c7..e501329d86 100644 --- a/split_cl.py +++ b/split_cl.py @@ -19,6 +19,13 @@ import owners_finder import git_common as git +# If a call to `git cl split` will generate more than this number of CLs, the +# command will prompt the user to make sure they know what they're doing. Large +# numbers of CLs generated by `git cl split` have caused infrastructure issues +# in the past. +CL_SPLIT_FORCE_LIMIT = 10 + + def ReadFile(file_path): """Returns the content of |file_path|.""" with open(file_path) as f: @@ -204,7 +211,7 @@ def SplitCl(description_file, comment_file, changelist, cmd_upload, dry_run, num_cls = len(files_split_by_owners) print('Will split current branch (' + refactor_branch + ') into ' + str(num_cls) + ' CLs.\n') - if cq_dry_ru and num_cls > CL_SPLIT_FORCE_LIMIT: + if cq_dry_run and num_cls > CL_SPLIT_FORCE_LIMIT: print ( 'This will generate "%r" CLs. This many CLs can potentially generate' ' too much load on the build infrastructure. Please email'