1.Command Line Tools文档
https://review.openstack.org/Documentation/cmd-index.html
2.使用
11月做了项目从SVN到Gerrit的迁移。
需要实现gerrit 提交 自动verify ±1和自动submit提交的功能。
感觉Command Line Tools里面的Gerrit code review还是蛮好用的。
code review的详细使用:
ssh -p <port> <host> gerrit review
[--project <PROJECT> | -p <PROJECT>]
[--branch <BRANCH> | -b <BRANCH>]
[--message <MESSAGE> | -m <MESSAGE>]
[--notify <NOTIFYHANDLING> | -n <NOTIFYHANDLING>]
[--submit | -s]
[--abandon | --restore]
[--rebase]
[--move <BRANCH>]
[--publish]
[--json | -j]
[--delete]
[--verified <N>] [--code-review <N>]
[--label Label-Name=<N>]
[--tag TAG]
{COMMIT | CHANGEID,PATCHSET}…
Tips:
问题,message:
message参数使用的时候如果要带变量的话一般-m "${message}"就好了。
如果message的值里面有空格的话就会报错(eg: message="this is a message")。
解决办法:
用单引号关闭空格就好了" '$message' "。一脸懵逼的看下shell十三问
当然如果双引号在内,单引号在外的话你会得这样的信息($message),因为单引号关闭了变量引用$。 : )
网友评论