The process for submitting a patch to the wave-protocol repository is:
Note that the code, draft specifications, and whitepapers are all in the same repository and changes to any of them should follow this process. StyleTake care to conform to the style of the file you're patching (there are Eclipse formatter and import order configurations in some repositories). If in doubt follow Sun's Java style guide. The following should also be observed when submitting code:
In addition, reading Effective Java it is strongly suggested. Make changesIf you add files then remember to Use request_codereview scriptWe use the Rietveld code review tool to submit a code review. This looks at the difference between the tip of the repository (or a specific version with --rev) and its current state, and uploads it to http://codereview.waveprotocol.org for other people to comment on. We use this both as a mechanism for distributing patches, and as a way to ensure they are a suitably high quality. Use hg log to find the revision number(s) before your changesets. $ ./request_codereview --send_mail -r reviewer@gmail.com,... [--rev=rev_before_change]Options:
You should specify one or more reviewers who are project committers. If you don't specify any reviewers people may assume your patch is not yet ready for review. Try to choose a reviewer who has worked on related regions of code before, but if you can't tell then pick anyone and they will reassign if necessary. You will be prompted for a password for the account specified with the You can view your patch at http://codereview.waveprotocol.org. Log in for a more detailed overview. Wait for reviewsReviewers (probably the wave-protocol maintainers, though anybody is welcome) will comment on your patch, either inline or with an overall comment. Look out for the phrase LGTM ("Looks Good To Me"). You should revise the code if requested, and reply to the comments either with "Done." or a more detailed response if necessary. Updating your patchWhen you make some changes to your patch, e.g. in response to reviewers' comments, you should update your patch so that your changes can be reviewed. Use the request_codereview script with a -i parameter specifying the issue number of the patch. For example, if the issue number is 22222, the command may be: $ ./request_codereview -i 22222 [--send_mail]This will create a new patch-set inside the patch review issue. The More complicated patches - making a cloneAfter code review against trunk, if the patch touches more than 1 or 2 files, it will make everyone's life easier if you push the changes to a clone on code.google.com In the web interface on code.google.com, click 'Source' tab, then the 'Clones' link. Create a new clone for yourself. From your local HG repo, push to the newly created clone with $ hg push https://clonename.googlecode.com/hg/Submitting your patchAfter an LGTM or two, a maintainer will download your patch from Rietveld and submit it to the mainline repository. ExampleFor an example, we change the client's scrolling keys to be [ and ] instead of { and }. $ hg clone https://wave-protocol.googlecode.com/hg/ wave-protocol$ cd wave-protocol$ vim src/org/waveprotocol/wave/examples/fedone/waveclient/console/ConsoleClient.java...$ hg stat -armM src/org/waveprotocol/wave/examples/fedone/waveclient/console/ConsoleClient.java$ hg diffdiff -r 9fb7aab3e2a9 src/org/waveprotocol/wave/examples/fedone/waveclient/console/ConsoleClient.java--- a/src/org/waveprotocol/wave/examples/fedone/waveclient/console/ConsoleClient.java Thu Aug 20 14:18:49 2009 +1000+++ b/src/org/waveprotocol/wave/examples/fedone/waveclient/console/ConsoleClient.java Sun Aug 23 12:29:51 2009 +1000@@ -114,7 +114,7 @@ // Set up scrolling -- these are the opposite to how you would expect because of the way that // the waves are scrolled (where the bottom is treated as the top)- reader.addTriggeredAction('}', new ActionListener() {+ reader.addTriggeredAction(']', new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (isWaveOpen()) { openWave.scrollUp(scrollLines.get());@@ -123,7 +123,7 @@ } }); - reader.addTriggeredAction('{', new ActionListener() {+ reader.addTriggeredAction('[', new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (isWaveOpen()) { openWave.scrollDown(scrollLines.get());$ ./request_codereview --send_mail -e example@gmail.com -m "Console client: use [ and ] rather than { and } to scroll"Upload server: codereview.waveprotocol.org (change with -s/--server)Loaded authentication cookies from /Users/example/.codereview_upload_cookiesIssue created. URL: http://codereview.waveprotocol.org/8002Uploading base file for src/org/waveprotocol/wave/examples/fedone/waveclient/console/ConsoleClient.java |