Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 439345

Summary: No way to specify remote to push
Product: [ECD] Orion Reporter: Paul Webster <pwebster>
Component: GitAssignee: Project Inbox <orion.git-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gheorghe, mamacdon, matthias.sohn, stefan.lay
Version: 6.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 424313    
Bug Blocks: 425233    

Description Paul Webster CLA 2014-07-10 09:40:19 EDT
When working with Gerrit, one common way is to define a review remote.  ex:

remote.review.url=ssh://pwebster@git.eclipse.org:29418/orion/org.eclipse.orion.client.git
remote.review.push=HEAD:refs/for/master

See  also https://wiki.eclipse.org/Orion/How_Tos/Using_Gerrit_in_Orion

I have a commit ready for Gerrit on the git-repository.html but I have no way to push to review (I can see the remote).  In effect, I have no way of issuing the "git push review" command.

I also couldn't figure out how to do a more general push with a refspec, ex: git push origin HEAD:refs/for/master

PW
Comment 1 Matthias Sohn CLA 2014-07-11 05:10:54 EDT
AFAIR if you configure the git option gerrit.createChangeId in the git configuration of your repository a button "Push for review" should be available in the UI which should allow to push to refs/for/master
Comment 2 Matthias Sohn CLA 2014-07-11 05:12:22 EDT
see bug 427575
Comment 3 Paul Webster CLA 2014-07-14 10:39:16 EDT
(In reply to Matthias Sohn from comment #1)
> AFAIR if you configure the git option gerrit.createChangeId in the git
> configuration of your repository a button "Push for review" should be
> available in the UI which should allow to push to refs/for/master

With this option set, I see a "Push for review" button ... but it still pushes to origin/master instead of refs/for/master and then fails because I'm not a committer.

Maybe I'm hitting bug 424313

PW
Comment 4 Paul Webster CLA 2014-07-14 10:53:50 EDT
So that bug blocks the gerrit.createChangeId workaround, and this bug highlights another problem: with a gerrit remote configured I can't push from my master branch HEAD to the gerrit remote (which has its push URL configured for HEAD:refs/for/master)

PW
Comment 5 Stefan Lay CLA 2014-07-14 12:01:27 EDT
(In reply to Paul Webster from comment #3)
 
> With this option set, I see a "Push for review" button ... but it still
> pushes to origin/master instead of refs/for/master and then fails because
> I'm not a committer.

This was introduced with commit 17cbab4e68445b4e6b412a68e333295b9356c25b and it worked.
In the mean time there was quite a lot of refactoring of the git client and it seems that it does not work anymore.
Comment 6 Stefan Lay CLA 2014-07-14 12:06:09 EDT
(In reply to Paul Webster from comment #0)
> When working with Gerrit, one common way is to define a review remote.  ex:
> 
> remote.review.url=ssh://pwebster@git.eclipse.org:29418/orion/org.eclipse.
> orion.client.git
> remote.review.push=HEAD:refs/for/master

I think this is related to bug 424313. The orion client always defines the push target, the git config is not taken into acount.

> I also couldn't figure out how to do a more general push with a refspec, ex:
> git push origin HEAD:refs/for/master

In orion 5 there was a possibility to specify a push target: After selecting Push there was a dialog where you could press a "More" button. In the following dialog you could enter refs/for/master. It seems that this dialog was removed.
Comment 7 Paul Webster CLA 2015-01-20 13:10:36 EST
I think this has been fixed on the git-repository.html page
Comment 8 Paul Webster CLA 2015-02-01 19:13:55 EST
This is now fixed in 8.0