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

Thiago Macieira thiago.macieira at intel.com
Wed Feb 26 16:47:27 GMT 2014


Em qua 26 fev 2014, às 16:04:53, Kanevskiy, Alexander escreveu:
> 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.

Hint: use the git-gpush script that you can find here:

	https://qt.gitorious.org/qt/qtrepotools/source/master:bin/git-gpush

You just need to make sure that the gerrit remote is called "gerrit". If you 
cloned from Gerrit, you can do:

	git remote rename origin gerrit

Then you can do:

	git gpush :devel
	git gpush :devel +someone at example.com		# adds as reviewer
	git gpush :devel =someone at example.com		# adds as Cc
	git gpush SHA-1:devel				# pushes SHA-1 instead of HEAD

Instead of email addresses, you can also use Gerrit account names.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



More information about the Dev mailing list