We are using a code review tool for blender development, to review changes before they go into trunk. The hope is to improve the quality of commits, with more eyes looking at the code we can prevent bugs, and having your code reviewed also generally keeps you on your toes.
The intention is not to require the use of this tool, or have it used for every little bugfix, it's up to the developers or reviewers to decide if they want to use it. Some guidelines:
- Only submit code for review if you are a developer with commit rights, or if you found a developer to get your code committed. If the experiment is a success, we can open it up more, but for now I'd like to keep it focused on things that we know are likely to go in.
- Anyone can participate in the code review however.
- This is not a place to do big interface design discussions or feature requests, stay focused on what is being worked on.
- If you reviewed the entire patch, and think the code is good to go in, reply LGTM (looks good to me).
To follow code reviews, subscribe to the new bf-codereview mailing list. All messages will be logged there, but comments should be added in the code review tool.
To comment on a code review, don't reply on the list, but do it in the code review tool. You can click on specific lines of code and add comments inline.
Create Issue using codereview_upload.py
To create a code review, you need a google account. From the blender source directory, with all changes applied, type:
It will prompt for your google account e-mail and password, and a description of the issue. To update the issue later on, you can run:
python source/tools/codereview_upload.py -i <issuenumber>
Create Issue on the website
Create an issue at http://codereview.appspot.com:
- Fill in subject and description.
- Base URL should be Blender Trunk, Base left empty.
- Add firstname.lastname@example.org to Reviewers.
- Attach a diff against current trunk.
Branch Review Tips
Reviewing branches is not natively supported as part of the codereview tool. However it's possible to apply changes from a branch to trunk with some simple commands. For this you need a clean checkout of the branch and trunk, with trunk at the revision of the last merge.
Then applying the changes to trunk can be done as follows. Be careful to not have any other files or changes in trunk, as they may be overwritten or included in the diff.
rsync -aC <branch-folder>/ <trunk-folder>/ svn add --force <trunk-folder>
- Only the person who created the issue can add new patches.
- Inline code comments are not preserved when adding a new patch.
- Reviewing branches is not natively supported.