summaryrefslogtreecommitdiffstats
path: root/subcmds/upload.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/upload.py')
-rw-r--r--subcmds/upload.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py
index a6ada337..e314032a 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -50,7 +50,7 @@ def _SplitEmails(values):
50class Upload(InteractiveCommand): 50class Upload(InteractiveCommand):
51 common = True 51 common = True
52 helpSummary = "Upload changes for code review" 52 helpSummary = "Upload changes for code review"
53 helpUsage=""" 53 helpUsage = """
54%prog [--re --cc] [<project>]... 54%prog [--re --cc] [<project>]...
55""" 55"""
56 helpDescription = """ 56 helpDescription = """
@@ -312,23 +312,23 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
312 312
313 # Check if there are local changes that may have been forgotten 313 # Check if there are local changes that may have been forgotten
314 if branch.project.HasChanges(): 314 if branch.project.HasChanges():
315 key = 'review.%s.autoupload' % branch.project.remote.review 315 key = 'review.%s.autoupload' % branch.project.remote.review
316 answer = branch.project.config.GetBoolean(key) 316 answer = branch.project.config.GetBoolean(key)
317 317
318 # if they want to auto upload, let's not ask because it could be automated 318 # if they want to auto upload, let's not ask because it could be automated
319 if answer is None: 319 if answer is None:
320 sys.stdout.write('Uncommitted changes in ' + branch.project.name + ' (did you forget to amend?). Continue uploading? (y/N) ') 320 sys.stdout.write('Uncommitted changes in ' + branch.project.name + ' (did you forget to amend?). Continue uploading? (y/N) ')
321 a = sys.stdin.readline().strip().lower() 321 a = sys.stdin.readline().strip().lower()
322 if a not in ('y', 'yes', 't', 'true', 'on'): 322 if a not in ('y', 'yes', 't', 'true', 'on'):
323 print("skipping upload", file=sys.stderr) 323 print("skipping upload", file=sys.stderr)
324 branch.uploaded = False 324 branch.uploaded = False
325 branch.error = 'User aborted' 325 branch.error = 'User aborted'
326 continue 326 continue
327 327
328 # Check if topic branches should be sent to the server during upload 328 # Check if topic branches should be sent to the server during upload
329 if opt.auto_topic is not True: 329 if opt.auto_topic is not True:
330 key = 'review.%s.uploadtopic' % branch.project.remote.review 330 key = 'review.%s.uploadtopic' % branch.project.remote.review
331 opt.auto_topic = branch.project.config.GetBoolean(key) 331 opt.auto_topic = branch.project.config.GetBoolean(key)
332 332
333 branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft) 333 branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft)
334 branch.uploaded = True 334 branch.uploaded = True
@@ -355,11 +355,11 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
355 print() 355 print()
356 356
357 for branch in todo: 357 for branch in todo:
358 if branch.uploaded: 358 if branch.uploaded:
359 print('[OK ] %-15s %s' % ( 359 print('[OK ] %-15s %s' % (
360 branch.project.relpath + '/', 360 branch.project.relpath + '/',
361 branch.name), 361 branch.name),
362 file=sys.stderr) 362 file=sys.stderr)
363 363
364 if have_errors: 364 if have_errors:
365 sys.exit(1) 365 sys.exit(1)
@@ -397,7 +397,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
397 reviewers = _SplitEmails(opt.reviewers) 397 reviewers = _SplitEmails(opt.reviewers)
398 if opt.cc: 398 if opt.cc:
399 cc = _SplitEmails(opt.cc) 399 cc = _SplitEmails(opt.cc)
400 people = (reviewers,cc) 400 people = (reviewers, cc)
401 401
402 if not pending: 402 if not pending:
403 print("no branches ready for upload", file=sys.stderr) 403 print("no branches ready for upload", file=sys.stderr)