summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subcmds/upload.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py
index c051f183..fc17670c 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -232,12 +232,13 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
232 232
233 if b: 233 if b:
234 script.append('#') 234 script.append('#')
235 destination = opt.dest_branch or project.dest_branch or project.revisionExpr
235 script.append('# branch %s (%2d commit%s, %s) to remote branch %s:' % ( 236 script.append('# branch %s (%2d commit%s, %s) to remote branch %s:' % (
236 name, 237 name,
237 len(commit_list), 238 len(commit_list),
238 len(commit_list) != 1 and 's' or '', 239 len(commit_list) != 1 and 's' or '',
239 date, 240 date,
240 project.revisionExpr)) 241 destination))
241 for commit in commit_list: 242 for commit in commit_list:
242 script.append('# %s' % commit) 243 script.append('# %s' % commit)
243 b[name] = branch 244 b[name] = branch
@@ -343,7 +344,8 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
343 key = 'review.%s.uploadtopic' % branch.project.remote.review 344 key = 'review.%s.uploadtopic' % branch.project.remote.review
344 opt.auto_topic = branch.project.config.GetBoolean(key) 345 opt.auto_topic = branch.project.config.GetBoolean(key)
345 346
346 branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft, dest_branch=opt.dest_branch) 347 destination = opt.dest_branch or branch.project.dest_branch or branch.project.revisionExpr
348 branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft, dest_branch=destination)
347 branch.uploaded = True 349 branch.uploaded = True
348 except UploadError as e: 350 except UploadError as e:
349 branch.error = e 351 branch.error = e