Can't see my changes in gerrit

428 views
Skip to first unread message

Giuseppe Salvatore

unread,
Nov 16, 2018, 11:32:53 AM11/16/18
to Repo and Gerrit Discussion
Hi everyone,
I feel quite newbie trying to get gerrit to work. I am almost there but strangely enough I can't see my changes in gerrit and about it I have a couple of questions.

1) When I setup/create a new repository do I need to do anything specific? For example do I need to create a refs/for/<branch> for each branch or will gerrit do it for me? I assume the second as I can clearly see * [new branch]      HEAD -> refs/for/master
2) What I can' see is the response from remote that usually gives you the url for the review as well as no changes in gerrit web interface (although the push seems to be successful)

I can't find anything that suggest how to configure this, in documentation it looks like it should all happen magically but I do believe there must be a server side hook that does it. 

Thanks for for your support.

Giuseppe

Giuseppe Salvatore

unread,
Nov 19, 2018, 6:29:32 AM11/19/18
to Repo and Gerrit Discussion
Ok found what the issue was, this might be useful for future reference.

Basically I was before pushing like this:

git push ssh://<my_user>@<my_host>:<full_path_from_root_to_the_repo>/DummyTest.git HEAD:refs/for/master

I had to change the port (I didn't actually know or understood that gerrit server side was catching the request through ssh, I though it was using git serverside hooks)

git push ssh://<my_user>@<my_host>:<port>/DummyTest.git HEAD:refs/for/master (with the relative path)

Hope this helps, sorry for bothering with a silly question but as the push request was working fine in the previous case I thought it was the way of doing it

Giuseppe

Quang Hòa Trần

unread,
Nov 21, 2018, 3:14:54 AM11/21/18
to Repo and Gerrit Discussion
Hi Guisepee,

Thanks for your contribution. I am also newbie here but I think I can answer your questions since I have committed and pushed my changes successfully:

1. I don’t think that you need to create refs/for/<branch>, the easy way is pull the branch you want to change, for instance, master. Do your change, then commit the code locally then push into refs/for/master.

Example: I need to fix a bug in master branch, here is the flow:
- git checkout master //switch to master branch
- git pull
- git checkout -b bugA //create a new local branch based on master, optional, in case you need to keep the change locally
(coding)
- git add a.java //add the code change
- git commit //you need to insert the commit message after this command
- git push refs/for/master

2. Go to gerrit-review.googlesource.com, the change would be here.

If it still does not work. Please make sure that you follow the steps such as creating the change id generator for git in your local pc or sign the google contribution rule on gerrit-review.

Hope it helps.

Hoa

Vào 23:32:53 UTC+7 Thứ Sáu, ngày 16 tháng 11 năm 2018, Giuseppe Salvatore đã viết:
Reply all
Reply to author
Forward
0 new messages