Commit 0614591e authored by Olivier Li's avatar Olivier Li Committed by LUCI CQ

Add more users warning to git cl split

Change-Id: I1306728d73701b2444d382f579aa8894d9857ed4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2892214
Commit-Queue: Olivier Li <olivierli@google.com>
Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Reviewed-by: 's avatarGabriel Charette <gab@chromium.org>
parent c4575f80
......@@ -126,8 +126,15 @@ def UploadCl(refactor_branch, refactor_branch_upstream, directory, files,
upload_args.append('--send-mail')
if enable_auto_submit:
upload_args.append('--enable-auto-submit')
print('Uploading CL for ' + directory + '.')
cmd_upload(upload_args)
print('Uploading CL for ' + directory + '...')
ret = cmd_upload(upload_args)
if ret != 0:
print('Uploading failed for ' + directory + '.')
print('Note: git cl split has built-in resume capabilities.')
print('Delete ' + git.current_branch() +
' then run git cl split again to resume uploading.')
if comment:
changelist().AddComment(FormatDescriptionOrComment(comment, directory),
publish=True)
......@@ -233,6 +240,16 @@ def SplitCl(description_file, comment_file, changelist, cmd_upload, dry_run,
if answer.lower() != 'y':
return 0
# Verify that the description contains a bug link.
bug_pattern = re.compile(r"^Bug:\s*[0-9]+", re.MULTILINE)
matches = re.findall(bug_pattern, description)
answer = 'y'
if not matches:
answer = gclient_utils.AskForData(
'Description does not include a bug link. Proceed? (y/n):')
if answer.lower() != 'y':
return 0
for cl_index, (directory, files) in \
enumerate(files_split_by_owners.items(), 1):
# Use '/' as a path separator in the branch name and the CL description
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment