Registry on GerritAndroid code review site: http://review.source.android.com
The site base on Gerrit.Gerrit is a web based code review system, facilitating online code reviews for projects using the Git version control system.
To submit your changes of Android code for public repository and code review, you need first register on the site using you google account.
Provide the public RSA/DSA public keycd ~/.ssh ssh-keygen -t rsa cat ~/.ssh/id_rsa.pub
Then copy the content of the public key file, and it into Gerrit's web interface.
To verify:
ssh -p 29418 Justin@review.source.android.com
and the message returns:
gerrit: no shell available
Connection to hostname closed.
curl https://review.source.android.com/ssh_info
the review website address returns:
review.source.android.com 29418
This is what repo use to upload the code.
Change Git Configurationgit config --global user.name="Justin" git config --global user.email="Justin@gmail.com"
Repo will use the 'Justin' part in the user email. It is better to keep user name same as email account.
This will modify the ~/.gitconfig, if without
--global option, the command will modify the
.git/config file.
Upload Code for Review
The Git-Push Methodcd frameworks/base git push ssh://Justin@review.source.android.com:29418/platform/frameworks/base HEAD:refs/for/master
From above command line, we need to get the following information before to push the code:
The Repo Methodrepo upload frameworks/base
Where does it push?
~/.gitconfigor.git/config
address:
.repo/manifest.xmlport: query by - https://review.source.android.com/ssh_info
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="korg"
fetch="git://android.git.kernel.org/"
review="review.source.android.com" />
<default revision="gingerbread"
remote="korg" />
<project path="build" name="platform/build">
<copyfile src="core/root.mk" dest="Makefile" />
</project>
<project path="bionic" name="platform/bionic" />
<project path="bootable/bootloader/legacy" name="platform/bootable/bootloader/legacy" />
... ...
</manifest>
frameworks/basemanifest.xml)All in one, this is the equivalent command line for the
above repo upload command:
git push --receive-pack=gerrit receive-pack ssh://Justin@review.source.android.com:29418/platform/frameworks/base refs/heads/test_branch:refs/for/gingerbreadWiki comments powered by Disqus