# Gerrit review system
1. If you don't have gerrit account, please visit http://achenserver:8080/ and register your own account by Register link (upper right corner).
It supports Yahoo Open ID. If you don't have please register one on http://openid.yahoo.com/
2. After logon gerrit, add your ssh public key into Settings->SSH Public Keys
3. Then you are ready to push your commit. Go to your project folder and make sure your modification is committed locally.
4. For example, I have a commit under frameworks/av and what to be reviewed. You should know the project name firstly.
achen@TpeSwBuildMachine:~/Project/Z580/frameworks/av$ git config --list | grep url
remote.aosp.url=git://tpeswbuildmachine.pixelworks.com/aosp/platform/frameworks/av
The
format of this git project name is git://[hostname]/[project name]
[hostname] = tpeswbuildmachine.pixelworks.com
[project name] = aosp/platform/frameworks/av
The
command to push your commit will be
git push ssh://hdzhu@achenserver.pixelworks.com:29418/[project name] HEAD:refs/for/[branch name]
git push ssh://hdzhu@achenserver.pixelworks.com:29418/aosp/platform/packages/apps/Settings HEAD:refs/for/qcom_8x94_04510
git push ssh://hdzhu@achenserver.pixelworks.com:29418/pxlw/vendor/pixelworks/IrisService HEAD:refs/for/qcom_8x94_04510
git
push ssh://chlin@achenserver.pixelworks.com:29418/aosp/platform/frameworks/av HEAD:refs/for/qcom_8x94_04510 <--- check the project name and refs head with command: git config --list
Then, you will see your commit is pushed to gerrit review system (http://achenserver:8080/
Be noted, gerrit system uses commit-message hook to formalize its commit content, please call following command before you commit
gitdir=$(git rev-parse --git-dir); sudo scp -p -P 29418 hdzhu@achenserver:hooks/commit-msg ${gitdir}/hooks/
If your commit is already created, please callgit commit --amend
to format the git message again.
So the all command as following.
gitdir=$(git rev-parse --git-dir); scp -p -P 29418 hdzhu@achenserver:hooks/commit-msg ${gitdir}/hooks/
git add .
git commit -m ""
git commit --amend
git config --list | grep url
git push ssh://hdzhu@achenserver.pixelworks.com:29418/pxlw/vendor/pixelworks/IrisService HEAD:refs/for/qcom_8x94_04510_iris2_40p
git push ssh://hdzhu@achenserver.pixelworks.com:29418/aosp/platform/packages/apps/Settings HEAD:refs/for/qcom_8x94_04510_iris2_40p
git push ssh://hdzhu@achenserver.pixelworks.com:29418/aosp/platform/frameworks/native HEAD:refs/for/qcom_8x94_04510_iris2_40p
git push ssh://hdzhu@achenserver.pixelworks.com:29418/codeaurora/platform/vendor/qcom/plutonium HEAD:refs/for/qcom_8x94_04510_iris2_40p
git push ssh://hdzhu@achenserver.pixelworks.com:29418/codeaurora/kernel/msm-3.10
HEAD:refs/for/qcom_8x94_04510_iris2_40p

本文介绍了如何使用Gerrit代码审查系统进行代码提交及审查的过程。包括注册账户、配置SSH密钥、推送提交到Gerrit服务器的具体步骤,并强调了在提交前正确配置commit消息的重要性。
2284

被折叠的 条评论
为什么被折叠?



