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