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

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/



你可能感兴趣的:(configuration)