From 59b31cb6e02b68450f2a5f96bdeffc2a7452d98c Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 8 Oct 2013 23:10:52 -0700 Subject: [PATCH] don't pass project revision to UploadForReview Passing a project revisionExpr to UploadForReview will cause it to try to push to refs/for/ 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 to remote branch ", 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 --- subcmds/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/ key = 'review.%s.uploadtopic' % branch.project.remote.review 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.uploaded = True except UploadError as e: