diff options
author | Colin Cross <ccross@android.com> | 2013-10-08 23:10:52 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2013-10-08 23:14:29 -0700 |
commit | 59b31cb6e02b68450f2a5f96bdeffc2a7452d98c (patch) | |
tree | fa64d25f4b75ac03909a0fc90dddcc4d232c6627 /subcmds | |
parent | e76efdd7b342577c40aa271fa5ded9d66a783a9b (diff) | |
download | git-repo-59b31cb6e02b68450f2a5f96bdeffc2a7452d98c.tar.gz |
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
Diffstat (limited to 'subcmds')
-rw-r--r-- | subcmds/upload.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index f5833dd3..74c287d0 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
@@ -344,7 +344,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
344 | key = 'review.%s.uploadtopic' % branch.project.remote.review | 344 | key = 'review.%s.uploadtopic' % branch.project.remote.review |
345 | opt.auto_topic = branch.project.config.GetBoolean(key) | 345 | opt.auto_topic = branch.project.config.GetBoolean(key) |
346 | 346 | ||
347 | destination = opt.dest_branch or branch.project.dest_branch or branch.project.revisionExpr | 347 | destination = opt.dest_branch or branch.project.dest_branch |
348 | branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft, dest_branch=destination) | 348 | branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft, dest_branch=destination) |
349 | branch.uploaded = True | 349 | branch.uploaded = True |
350 | except UploadError as e: | 350 | except UploadError as e: |