Review Board on Ubuntu System(II)Script and Server configuration

本文详细介绍了在Ubuntu系统上配置ReviewBoard的过程,包括用户及权限设置、解决安装过程中的问题,以及如何通过post-review脚本提交代码审查请求。文中还提供了一个定制化的post-review脚本示例。
Review Board on Ubuntu System(II)Script and Server configuration

1. Server configuration
add user hua.luo and sillycat
add group sillycat_team
add repository

give all the rights to the user hua.luo

I got one error during adding repository
error message:
The Python module "pysvn" is not installed.You may need to restart the server after installing it

solution:
>sudo apt-get install python-svn

2. post review
2.1 install post-review
>sudo easy_install -U RBTools

2.2 Usage
>post-review --diff-filename=mycode.diff

>post-review --username=hua.luo --password=password --submit-as=username

Basic Options
-d --debug

-h --help

-o --open
open a web browser to the address of the review request

--version

Server Options
--server=<URL>
--submit-as=<USERNAME>
--username=<USERNAME>
--password=<PASSWORD>

Review Request Options
-p --publish
publishes the review request immediately

-r=<ID> --review-request-id=<ID>

--description=<DESCRIPTION>

--diff-filename=<FILENAME>

--summary=<SUMMARY>

--target-groups=<TARGET_GROUPS>

--target-people=<TARGET_PEOPLE>

--respository-url=<URL>

example:
>post-review --username=hua.luo --password=password --submit-as=hua.luo --server=http://reviews.sillycat.com:86/reviews/
target-groups=sillycat_team

The script is in /usr/local/bin/post-review

error message:
File "/usr/local/lib/python2.7/dist-packages/RBTools-0.3.2-py2.7.egg/rbtools/postreview.py",line 342, in retry_http_basic_auth
if response.code != 401:
AttributeError: 'NoneType' object has no attribute 'code'.

solution:
That is only because that I configure the auth of apache2. So after I get rid of the auth configuration. It is ok now.

3. Write a customer file
I download the sample file from this URL:
http://reviewboard.googlecode.com/issues/attachment?aid=-2885235081841507145&name=post-review.py
&token=cfc7bbf7a848a13fa2b9601ad4c451ad

I made some changes as follow:
REVIEWBOARD_URL = 'http://reviews.sillycat.com:86/reviews/'


# Default submission arguments. These are all optional; run this

# script with --help for descriptions of each argument.

TARGET_GROUPS = 'sillycat_team'

TARGET_PEOPLE = None

SUBMIT_AS = 'hua.luo'

PUBLISH = False

OPEN_BROWSER = True


# Debugging. For development...

DEBUG = True

I put the file in /usr/bin/, then I can run >post-review.py anywhere I want.

I will also attach this file in my blog.

references:
http://www.reviewboard.org/docs/manual/dev/users/tools/post-review/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值