[Dev] How to set up gerrit? The instructions are NOT helpful

Kanevskiy, Alexander alexander.kanevskiy at intel.com
Wed Feb 26 16:04:53 GMT 2014

On 26/02/14 17:50 , "Alexander Kanavin" <alexander.kanavin at intel.com>

>Hello all,
>after cloning a project, I'd like to set up gerrit, but the instructions
>are really not helping.

In reality, you don’t need to change your .git/config that is generated by
default in your cloned repository.

You may add few lines to it if you’d like, but it is not mandatory.

Let me explain few additions that might be useful:

1. in remote “origin” section:

    push = HEAD:refs/for/devel

this helps to simplify operation with submitting patches.

without it, it’s better to do “git push origin HEAD:refs/for/tizen” (if
you’re submitting patches from your HEAD towards tizen branch for review).
line above just makes it simpler for developer to type “git push origin”.
the rest, HEAD and target branch it would take from config.

2. in remote “origin” section:
    receivepack = git receive-pack --reviewer=<E-mail_Address> …

this helps to add automatically some specific reviewers for that project,
if you’d like to specify them manually. (e.g. you want 2-3 of your
colleagues explicitly reviewing your patches).
You don’t need to do that explicitly, as domain maintainers would would be
added automatically to change.

>The webpage 
>Add the following configuration in .git/config and save the file:
>[remote "origin"]
>     fetch = +refs/heads/*:refs/remotes/origin/*
>     url = tizen:<Project>
>     push = HEAD:refs/for/devel
>     receivepack = git receive-pack --reviewer=<E-mail_Address> ...
>[Branch "<Local_Branch>"]
>     remote = origin
>     merge = refs/heads/master
>Okay, but my existing .git/config looks like:
>         repositoryformatversion = 0
>         filemode = true
>         bare = false
>         logallrefupdates = true
>[remote "origin"]
>         url = ssh://akanavin@review.tizen.org:29418/profile/ivi/rygel
>         fetch = +refs/heads/*:refs/remotes/origin/*
>[branch "tizen"]
>         remote = origin
>         merge = refs/heads/tizen
>[branch "upstream"]
>         remote = origin
>         merge = refs/heads/upstream
>So do I really add one to the other, or do I somehow merge the two
>configs? What should I fill in for project, local branch, and email
>address, how am I supposed to know those? Can I simply get a complete,
>working example for a real project, that I can copy and tweak?
>Also, what is the meaning of the above snippet, and what's going to
>happen after I add it?
>Because I don't know the answers to any of the above questions, I've
>skipped the gerrit review altogether and pushed my change straight to OBS.
>Dev mailing list
>Dev at lists.tizen.org

Best regards, Alexander Kanevskiy.

Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

More information about the Dev mailing list