Using gerrit in a proper way? forks? #help


walzert
 

Hello together,
could someone give me a introduction in using gerrit in a good way`?
I want to do some changes for testing, I saw that there are some sandboxes.
Are they used for that, and if yes how can I create sandboxes`?
Thank you
Thomas


Stephane Desneux
 

Hi Thomas,

If you have a registered account on AGL gerrit, you can push changes to your own
personal branch. This is a mechanism we (IoT.bzh) proposed very early in the
project but I don't remember if this is documented somewhere (anyone to post a
link to documentation on that topic?).

Basically, if you have a $login on gerrit, then you're in a position to push
anything to a "sandbox branch" directly, without review.

The branch name must be: sandbox/$login/$yourtopic

So you can have multiple branches (1 per topic) on the same repo.

For example, you can clone AGL/meta-agl, change a recipe, do your own commit
then push to your sandbox (assuming your login is 'twalzer'):

# git push origin HEAD:sandbox/twalzer/mytopic

You can also rewrite your own branch and "push force":

# git push origin +HEAD:sandbox/twalzer/mytopic

or simply drop your sandbox when it becomes useless:

# git push origin :sandbox/twalzer/mytopic

There are more advanced usages of sandboxes like merging the content of a
sandbox in a master branch and doing a review with it but I'd prefer to have
Gerrit admins to write such instructions officially. (I'm NOT the sysadmin :))

Best,
---
Stephane Desneux - CTO - IoT.bzh
stephane.desneux@... - www.iot.bzh

On 28/06/2020 23:25, walzert wrote:
Hello together,
could someone give me a introduction in using gerrit in a good way`?
I want to do some changes for testing, I saw that there are some sandboxes.
Are they used for that, and if yes how can I create sandboxes`?
Thank you
Thomas


walzert
 

Hello Stephane,

thank you very much. Your answer was really helpful, I have just one question remaining.

If I have one thing that I want to change over multiple repos e.g. to change a service (permissions in the can_service) in an image that I will build, do I have to use the same sandbox-name e.g. "sandbox/walzert/can_changes" ?

And then use

repo init -b sandbox/walzert/can_changes -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo

and if there is no "sandbox/walzert/can_changes" branch for other repos (there are no changes necessary) is that ok?



Regards
Thomas

On 29.06.20 01:18, Stephane Desneux wrote:

Hi Thomas,

If you have a registered account on AGL gerrit, you can push changes to your own
personal branch. This is a mechanism we (IoT.bzh) proposed very early in the
project but I don't remember if this is documented somewhere (anyone to post a
link to documentation on that topic?).

Basically, if you have a $login on gerrit, then you're in a position to push
anything to a "sandbox branch" directly, without review.

The branch name must be: sandbox/$login/$yourtopic

So you can have multiple branches (1 per topic) on the same repo.

For example, you can clone AGL/meta-agl, change a recipe, do your own commit
then push to your sandbox (assuming your login is 'twalzer'):

# git push origin HEAD:sandbox/twalzer/mytopic

You can also rewrite your own branch and "push force":

# git push origin +HEAD:sandbox/twalzer/mytopic

or simply drop your sandbox when it becomes useless:

# git push origin :sandbox/twalzer/mytopic

There are more advanced usages of sandboxes like merging the content of a
sandbox in a master branch and doing a review with it but I'd prefer to have
Gerrit admins to write such instructions officially. (I'm NOT the sysadmin :))

Best,
---
Stephane Desneux - CTO - IoT.bzh
stephane.desneux@... - www.iot.bzh

On 28/06/2020 23:25, walzert wrote:


Stephane Desneux
 

No, branch names don't have to be the same everywhere, but it clearly helps to
avoid confusion :)

For example, if I try to fix SPEC-1234, I name my sandboxes
'sandbox/sdesneux/SPEC-1234' everywhere.

---
Stephane Desneux - CTO - IoT.bzh
stephane.desneux@... - www.iot.bzh

On 29/06/2020 09:16, walzert wrote:
Hello Stephane,

thank you very much. Your answer was really helpful, I have just one question
remaining.

If I have one thing that I want to change over multiple repos e.g. to change a
service (permissions in the can_service) in an image that I will build, do I
have to use the same sandbox-name e.g. "sandbox/walzert/can_changes" ?

And then use

|repo init -b ||sandbox/walzert/can_changes -u
https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo|


and if there is no "sandbox/walzert/can_changes" branch for other repos (there
are no changes necessary) is that ok?



Regards
Thomas

On 29.06.20 01:18, Stephane Desneux wrote:
Hi Thomas,

If you have a registered account on AGL gerrit, you can push changes to your own
personal branch. This is a mechanism we (IoT.bzh) proposed very early in the
project but I don't remember if this is documented somewhere (anyone to post a
link to documentation on that topic?).

Basically, if you have a $login on gerrit, then you're in a position to push
anything to a "sandbox branch" directly, without review.

The branch name must be: sandbox/$login/$yourtopic

So you can have multiple branches (1 per topic) on the same repo.

For example, you can clone AGL/meta-agl, change a recipe, do your own commit
then push to your sandbox (assuming your login is 'twalzer'):

# git push origin HEAD:sandbox/twalzer/mytopic

You can also rewrite your own branch and "push force":

# git push origin +HEAD:sandbox/twalzer/mytopic

or simply drop your sandbox when it becomes useless:

# git push origin :sandbox/twalzer/mytopic

There are more advanced usages of sandboxes like merging the content of a
sandbox in a master branch and doing a review with it but I'd prefer to have
Gerrit admins to write such instructions officially. (I'm NOT the sysadmin :))

Best,
---
Stephane Desneux - CTO - IoT.bzh
stephane.desneux@... - www.iot.bzh

On 28/06/2020 23:25, walzert wrote: