Making a Patch on NetBeans
From JRubyWiki
Newbie contributers might struggle a lot when they are to create a patch for the first time because they must set up their environment based on checked out codes, create an appropriate patch file, and so on. These steps describe how to create a patch by using NetBeans IDE 6.0. This instruction may help those who want to contribute to JRuby but don't know how to do.
1. Open the NetBeans IDE 6.0. Make sure you have the Java plugin installed. (If you're like me, and have worked mostly with Ruby in NetBeans, it might not be...)
2. Click "Versioning" on the toolbar, select "Subversion", then "Checkout." Type http://svn.codehaus.org/jruby/trunk/jruby in the "Repository URL" field. Click "Next", then "Finish."
- Since NetBeans creates a JRuby project automatically, you don't need to create the project for checkout-JRuby codes beforehand.
3. Edit a file you want to make a patch and save it.
- See http://wiki.jruby.org/wiki/JRuby_Style_Guide before you edit a file.
4. Build the JRuby project by right-clicking on the JRuby project in Projects window, and select "Build."
- NetBeans builds new version of jruby.jar in your NetBeans projects directory/folder. For example, /home/foo/netbeans/projects/jruby/lib/jruby.jar.
5. Test newly built JRuby.
- Don't forget. JRuby's codes in the svn repository are updated day by day. Make sure your patch works for the current(trunk), newest ones.
6. Click the JRuby project in Projects window, then click "Versioning" on the toolbar and select "Export Diff Patch." Input "File Name" and click "Export."
- You don't need to type a file extension such as ".diff" or ".patch." NetBeans adds ".patch" extension automatically. Clicking the JRuby project makes a path in a patch file starting with "src/org/jruby/," like shown below:
Index: src/org/jruby/javasupport/JavaEmbedUtils.java --- src/org/jruby/javasupport/JavaEmbedUtils.java Base (BASE) +++ src/org/jruby/javasupport/JavaEmbedUtils.java Locally Modified (Based On LOCAL)
done.

