My favorites | Sign in
Logo
                
Search
for
Updated Oct 21, 2009 by jasvir
ContributingCode  
How to contribute to code to Caja

Introduction

To contribute to Caja, you will need to install python2.4 and gvn.

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
  9. Send it off for review
  10. $ myvn mail --reviewers your-friendly-neighborhood-cajador@gmail.com
    This will 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
  14. $ myvn snapshot
  15. Maybe add or remove files
  16. $ myvn change
  17. Commit the change
  18. $ myvn submit
  19. Show the change description
  20. $ myvn describe
  21. Delete the change branch
  22. $ 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

Legal

See also the Contributor Licence Agreement (either the individual CLA or the [http://code.google.com/legal/corporate-cla-v1.0.html corporate CLA]).


Sign in to add a comment