下载镜像代码
repo init --mirror --repo-url ssh://xx/repo.git -u ssh://xx/manifests.git -m manifest.xml
repo sync
创建AOSP project

对All Project权限修改

创建repo
在刚才下载的codebase根目录执行如下命令:
repo forall -c 'echo $REPO_PROJECT; ssh -p 29420 username@xxx gerrit create-project --owner Administrators $REPO_PROJECT;'
设置repo的parent repo为AOSP
在刚才下载的codebase根目录执行如下命令:
repo forall -c 'echo $REPO_PROJECT; ssh -p 29420 username@xxx gerrit set-project-parent --parent AOSP $REPO_PROJECT;'
将Android Codebase的代码push到gerrit服务器
在刚才下载的codebase根目录执行如下命令:
repo forall -c 'echo REPO_PROJECT; git push username@xxx:29420/REPO_PROJECT +refs/heads/*'
repo forall -c 'echo REPO_PROJECT; git push username@xxx/REPO_PROJECT +refs/heads/* +refs/tags/*'
测试下载代码
repo init -u ssh://username@xxx:29420/manifests.git -b master --repo-url=ssh://username@xxx:29420/repo.git --repo-branch=master -m manifest.xml --no-repo-verify
repo sync -j4
解决问题:单笔提交文件数量和超时问题
vi gerrit.config
