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'