Gerrit命令

查看可见的群组 ssh -p 29418 admin@localhost gerrit ls-groups

#创建新的项目,--owner需要的群组必须要在Gerrit已经定义好的 

ssh -p 29418 admin@localhost gerrit create-project "test/helloworld" --description "'Tools used by build system'" --owner "user/admin" --parent "All-Projects" 
#修改项目配置 

ssh -p 29418 admin@localhost gerrit set-project "repo_name" --project-state ACTIVE --submit-type FAST_FORWARD_ONLY

#设置继承项目 

ssh -p 29418 admin@localhost gerrit set-project-parent "repo_name" --parent "parent_repo"

#自动审查打分 

ssh -p 29418 admin@localhost gerrit review {COMMITID | CHANGEID,PATCHSET} --verified +1 --code-review +1 --message "review from ssh"

#查找push gerrit link change number:

ssh -p 29418 172.16.0.120 gerrit query 169 --current-patch-set|grep {COMMITID | CHANGEID,PATCHSET} 

#自动打分submit:

ssh -p 29418 172.16.0.120 gerrit review COMMITID | CHANGEID,PATCHSET}  --verified +1  --code-review +2 --submit

#重新加载replication.config 配置

ssh -p 29418 gerrit-admin@localhost gerrit plugin reload replication

#手动触发replication 对某个项目执行

ssh -p 29418 gerrit-admin@localhost replication start project_name

猜你喜欢

转载自scm002.iteye.com/blog/2361345