|
If you want to contribute code to Chromium, there are a few things you can do to make the process flow smoothly. Communicate
Get your code ready
Request a review1. Find a reviewer. Ideally, the reviewer is someone who is familiar with the area of code you are touching. If you have doubts, look at the blame for the file to see who else has been editing it. Failing that, ask on #chromium on irc.freenode.net. You can also just request review from chromium-reviews@googlegroups.com, but more specific review requests will be attended to sooner.2. Create a changelist. We use Subversion, but use some tools on top of it for the review and committing process. Make a changelist with the gcl change command. The changelist name is only to help you refer to it on your local computer, so call it whatever you want:
C:\code\src\chromium> gcl change mychange
This will open your text editor. Write the change description at the top of the file. The description should
describe what your patch changes and why. This is important for people
who are looking at commit logs in the future to track down an issue:
they should be able to see why you changed it without going anywhere
else. You should also add a BUG=bug_number line at the end of the description so they can find the associated bug. Example:
Increase the goat teleporter timeout threshold to 100 because the old
value of 10 caused problems for extremely overweight goats. Tests show
that the largest goat in existence should be teleported in 50ms, so...
BUG=112358 Cut and paste the filenames above or below the divider to add files to or remove files from the changelist. You can use the gcl opened command to see your changed files and changelists: C:\code\src\chromium> gcl opened
M browser\browser.vcproj ← this is a modified file not in any changelist
--- Changelist mychange:
M browser\browser.cc
3. Upload your change. Use the gcl upload command:
C:\code\src\chromium> gcl upload mychange
Issue created. URL: http://codereview.chromium.org/123456
Uploading browser\browser.cc (1/1)
You may have to enter a Google Account username and password (for example, your Gmail credentials). The URL it gives you is the page where the review can be accessed. If you want to upload a new copy of your patch, optionally add or remove files using gcl change and upload it again using the same gcl upload command.
Once you've uploaded your change and know its patch URL, add that to the bug comments. That way someone coming along later can make comments or see how the bug was fixed. 4. Request review. Go to the supplied URL or just go to the main Chromium code review page and click Issues created by me. Select the change you want to submit for review and click Edit Issue. Enter at least one reviewer's email address and click Update Issue. Now click on Publish+Mail Comments, add any optional notes, and send your change off for review. All Chromium code reviews are automatically cc'd to the chromium-reviews@googlegroups.com group, so that everyone has an opportunity to see and comment on the changes being made.
Note: If you don't see editing commands on the review page, click Log In in the upper right.
The review processChromium reviewers try to review code that conforms to these guidelines as quickly as possible. You should hear back within 24-48 hours. Remember though, if you submit a giant patch, or do a bunch of work without discussing it with the relevant people, you may have a hard time convincing anyone to review it! Speak with others early and often. Sometimes, the tree will be locked down and certain types of changes won't be allowed. This is true when we're preparing a release. During times like these, reviewers may be focused on fixing the bugs required to get the release out the door.Remember that code reviews are an important part of the engineering process. The reviewer will almost always have suggestions or style fixes for you, and it's important not to take such suggestions personally or as a commentary on your abilities or ideas. This is a process where we work together to make sure that the highest quality code gets submitted!
You will likely get email back from the reviewer with comments. Fix these and update the patch set in the issue by re-running gcl upload as above. Once you're ready for another review, use Publish+Mail Comments again to send another notification (you can say something like "new snapshot uploaded"). When the reviewer is happy with your patch, they will say something like "OK" or "LGTM" ("Looks Good To Me"). Note: As you work through the review process, both you and your reviewers should converse using the code review interface, and send notes using Publish+Mail Comments. Avoid the temptation to respond directly to review mails (or, for reviewers, to send review comments) directly from your email client; doing that won't add your comments to the online record for the issue under review, and can make it hard for others to understand later what the history of a patch was.
Check in your changes
Be responsible
|