您的位置:首页 > 其它

review board 安装和使用系列 ---(五)RBTools使用

2012-11-18 16:11 561 查看
============================================================博文原创,转载请声明出处电子咖啡(原id蓝岩)============================================================上一篇提到的申请review过程是在是繁琐点,型号官方提供了RBTools来解决这个问题,以后提交只要一个命令即可 


安装 RBTools
git clone git://github.com/reviewboard/rbtools.git
cd rbtools
sudo python setup.py install
安装过后,cd切换到自己的svn work copy下面,使用一下命令来指定当前work copy所对应的reviewbaord地址
svn propset reviewboard:url http://reviewboard.example.com .首次提交时候,需要输入下面的命令来配置自己用户名(zhangsan)和审核人(lisi) 
post-review --username=zhangsan --target-people=lisi
以后每次修改,我们只需要输入以下命令即可,
post-review
更多的post-review命令可以输入以下命令得到
post-review --help
post-review 所有命令如下:
ltekiMac-2:Y l$ post-review --help
Usage: post-review [-pond] [-r review_id] [changenum]

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-p, --publish publish the review request immediately after
submitting
-r ID, --review-request-id=ID
existing review request ID to update
-o, --open open a web browser to the review request page
-n, --output-diff outputs a diff to the console and exits. Does not post
--server=SERVER specify a different Review Board server to use
--disable-proxy prevents requests from going through a proxy server
--diff-only uploads a new diff, but does not update info from
changelist
--reopen reopen discarded review request after update
--target-groups=TARGET_GROUPS
names of the groups who will perform the review
--target-people=TARGET_PEOPLE
names of the people who will perform the review
--summary=SUMMARY summary of the review
--description=DESCRIPTION
description of the review
--description-file=DESCRIPTION_FILE
text file containing a description of the review
-g, --guess-fields equivalent to --guess-summary --guess-description
--guess-summary guess summary from the latest commit
(git/hg/hgsubversion only)
--guess-description guess description based on commits on this branch
(git/hg/hgsubversion only)
--testing-done=TESTING_DONE
details of testing done
--testing-done-file=TESTING_FILE
text file containing details of testing done
--branch=BRANCH affected branch
--bugs-closed=BUGS_CLOSED
list of bugs closed
--change-description=CHANGE_DESCRIPTION
description of what changed in this revision of the
review request when updating an existing request
--revision-range=REVISION_RANGE
generate the diff for review based on given revision
range
--submit-as=USERNAME user name to be recorded as the author of the review
request, instead of the logged in user
--username=USERNAME user name to be supplied to the reviewboard server
--password=PASSWORD password to be supplied to the reviewboard server
--change-only updates info from changelist, but does not upload a
new diff (only available if your repository supports
changesets)
--parent=PARENT_BRANCH
the parent branch this diff should be against (only
available if your repository supports parent diffs)
--tracking-branch=TRACKING
Tracking branch from which your branch is derived (git
only, defaults to origin/master)
--p4-client=P4_CLIENT
the Perforce client name that the review is in
--p4-port=P4_PORT the Perforce servers IP address that the review is on
--p4-passwd=P4_PASSWD
the Perforce password or ticket of the user in the
P4USER environment variable
--svn-changelist=SVN_CHANGELIST
generate the diff for review based on a local SVN
changelist
--repository-url=REPOSITORY_URL
the url for a repository for creating a diff outside
of a working copy (currently only supported by
Subversion with --revision-range or --diff-filename
and ClearCase with relative paths outside the view).
For git, this specifiesthe origin url of the current
repository, overriding the origin url supplied by the
git client.
-d, --debug display debug output
--diff-filename=DIFF_FILENAME
upload an existing diff file, instead of generating a
new diff
--http-username=USERNAME
username for HTTP Basic authentication
--http-password=PASSWORD
password for HTTP Basic authentication
我自己的操作环境是mac,今天给同事在windows安装 RBTools的时候遇到了不少错误如下:
在执行post-review --username=zhangsan --target-people=lisi的时候,提示
The --repository-url option requires either the --revision-range option or the
-diff-filename option.
试过了集中方法,还是不行,就让他手动上传diff文件方式提交了,如果又那位朋友知道如何解决,可以留言告知啊,谢谢了
参考 http://www.reviewboard.org/docs/manual/dev/users/tools/post-review/#cmdoption-post-review--server
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: