mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
don't pass project revision to UploadForReview
Passing a project revisionExpr to UploadForReview will cause it to try to push to refs/for/<sha> if the revision points to a sha instead of a branch. Pass None for dest_branch if no destination branch has been specified, which will cause UploadForReview to upload to the merge branch. There is room for further improvement, the user prompts will still print "Upload project <project> to remote branch <sha>", and then upload to the merge branch and not the sha, but that is the same behavior that was in 1.12.2. Change-Id: I06c510336ae67ff7e68b5b69e929693179d15c0b
This commit is contained in:
parent
e76efdd7b3
commit
59b31cb6e0
@ -344,7 +344,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
|
|||||||
key = 'review.%s.uploadtopic' % branch.project.remote.review
|
key = 'review.%s.uploadtopic' % branch.project.remote.review
|
||||||
opt.auto_topic = branch.project.config.GetBoolean(key)
|
opt.auto_topic = branch.project.config.GetBoolean(key)
|
||||||
|
|
||||||
destination = opt.dest_branch or branch.project.dest_branch or branch.project.revisionExpr
|
destination = opt.dest_branch or branch.project.dest_branch
|
||||||
branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft, dest_branch=destination)
|
branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft, dest_branch=destination)
|
||||||
branch.uploaded = True
|
branch.uploaded = True
|
||||||
except UploadError as e:
|
except UploadError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user