Gerrit Admin

From LSDevLinux
Jump to: navigation, search

Some random notes about administering Gerrit and using repo

Administrative tasks

Creating a new project

$ ssh -p 29418 gerrit create-project --name new/project --description "'description for new project'"

Then import the existing code base into Gerrit's git repo:

$ git push ssh:// HEAD:refs/heads/master

You might have to edit the access rights for the project in Gerrit and temporarily add Forge Identity:+3 for your user/group.

Using repo

Initializing complete FieldWorks project

$ mkdir fwrepo
$ cd fwrepo
$ repo init -u git://
$ repo sync
$ cd Calgary/WW
$ git config --add remote.gerrit.fetch +refs/remotes/p4/*:refs/remotes/p4/*
$ git config review."".username mygerritusername
$ git fetch gerrit
$ cd .git/hooks
$ ln -s ../../../../manifests/pre-rebase .

Starting work in a topic branch

$ repo start BRANCHNAME --all

Sending changes for review to Gerrit

$ repo upload