My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ContributingCode  
How to contribute code to Caja
Updated Oct 25, 2011 by jas...@gmail.com

Introduction

Directory structure

Use the following directory structure for your changes:

 svn-changes
     |
     +----my-change-1
     |        |
     |        +----google-caja
     |                 |
     |                 +----src
     |
     +----my-change-2
              |
              +----google-caja
                       |
                       +----src

In this way, the myvn script you will use for creating and submitting changelists can provide a changelist name for you for common commands. For example, myvn change will behave like gvn change -c my-change-1 if run under svn-changes/my-change-1/google-caja as will other gvn commands like mail, describe and snapshot unless a changelist name is explicitly provided.

Life of a Changelist

  1. Create a client directory
  2. $ mkdir -p svn-changes/my-change-name
  3. Checkout the src
  4. $ cd svn-changes/my-change-name
    $ myvn checkout
    $ cd google-caja/
  5. Muck around with some source files
  6.       See Eclipse steps below
  7. Prepare a changelist
  8. $ myvn change
    Should pop up an editor. Check the EDITOR, or SVNEDITOR environment variables if it doesn't. This is a purely local operation.
  9. Send it off for review
  10. $ myvn mail
    This will upload to codereview.appspot.com, send mail to the reviewers specified using myvn change, and automatically CC google-caja-discuss.
  11. File a bug to track the review
  12. $ myvn bug
    and copy and paste the url into your browser.
  13. Update your changes based on feedback and snapshot for review
  14. $ myvn snapshot
  15. Maybe add or remove files
  16. $ myvn change
  17. Commit the change
  18. $ myvn submit
This will also cause your change to be tested before submission. You'll need a modern Firefox (FF5+) to run the tests.
  1. Show the change description
  2. $ myvn describe
  3. Delete the change branch
  4. $ myvn change --delete

Eclipse

  1. Generate the project
  2. $ myvn eclipse
  3. Open Eclipse
  4. Choose New Java Project
  5. From Existing Source
  6. Enter the .../svn-changes/my-change-1/google-caja/ path
  7. Finish
  8. Build some stuff
  9. $ ant
  10. Test stuff
  11. Right click on project and select "Run As" > "JUnit Test"
    $ ant runtests

Other Commands

  • changed - files changed in the snapshotted CL. Pipeable to xargs
  • diffstats - number of lines added/changed/removed
  • files - files changed in svn. Pipeable to xargs
  • filetypes - sets svn:mime-type of modified files based on file suffix

Legal

See also the Contributor Licence Agreement (either the individual CLA or the corporate CLA).


Sign in to add a comment
Powered by Google Project Hosting