Automatically submit a code review request using Rbtool
Objective
Let's recall the process of submitting a review request manually:
- First you have to generate the diff file with svn diff > filename.diff.
- Then enter the URL of the review board, which may be rb.companyname.com
- You will then need to enter your account password for login verification.
- Then you need to fill out your SVN repository address and upload the diff file.
- Then you go to the detailed page of the review request, fill in the summary, description, Test-done, group and people items, and usually your group is fixed, review your people that's how several people change back and forth.
- Finally, you fill out the content and click Publish to post your review request.
Rbtool Installation and Configuration
Is that annoying? In fact, review Board official website provides a rbtool,
can help you to eliminate all these steps, all you need to do is to hit a command line Post-review instructions.
Very exciting, huh? Let's take a look at how to install Rbtool.
First of all, you need to install Git, Python, Mac classmate said that these things are safe to install, if the old version of the Mac, you can also download the installation itself. The windows/mac/linux version of Git is: http://git-scm.com/.
After downloading the git installation, enter
The Ok,post-review has been installed. Then you need a small configuration, in the root directory of your own SVN project, to create:. reviewboardrc files. In the file, enter:
Reviewboard_url = "http://rb.yourcompany.com" REPOSITORY = "https://dev.yourcompany.com/svn/xxxx"
|
These 2 lines represent your company's review board URL and the SVN root address, respectively. # # # Rbtool Use OK, later you want to submit review request, only need to enter Post-review in the project root directory. The first time you need to enter the login review Board user name password, Post-review tool will remember the password, will not be entered later. Post-review will submit the diff changes in your current SVN directory to review board by default. You can also add some specified parameters to specify group, people, description, and so on. For example, I wrote a small script that changed the Post-review to:
Post-review--target-groups=mygroup--target-people=friendname1,friendname2
Post-review can also update previously submitted diff by specifying review number with-R. Specifically, you can use Post-review–help to view the details. You can also go to review Board official website to see the detailed instructions: http://www.reviewboard.org/docs/codebase/dev/getting-started/#rbtools
If it's a git SVN managed project, add the parameter: –parent git-svn.
Quickly use Rbtool tools to improve your productivity.
Automatically submit a code review request using Rbtool