Contributing Patches

Well-described, easy-to-apply patches are a pleasure for other developers to encounter and go a long way towards making the module or component more stable and powerful.

If you are not yet a member of an open source project on this site but you have mailing list access, you can post a message about your proposed patch to the project's developer mailing list. (Read more about subscribing to project mailing lists.)

If you are a project member, first conduct a query of the project's issue database to determine whether this patch is associated with an already reported defect.

If your patch pertains to an existing issue, you should use the File Attach field in the issue edit screen to submit your patch and the Add Comment section to post an explanatory message. (Remember that changes to issues generate automatic email messages to the issue's owner and anyone on the cc list. All of those people will receive your message and a link to your patch.)

If an issue does not exist, submit your patch as a new issue, using the Patch link in the "Enter An Issue" section of the Issue Tracking page. Attach your patch file to the new issue. Here's how to do it:

  1. First, make sure you are making changes in the most recent version of the source files -- for this, it is best to use CVS to check out the source (on the CVS trunk), make your modifications (but do not check them in), and then run the command:

    cvs diff -c > mypatch

    ... to get a context-format patch for the sources. This gives you a patch file which includes information about the version you are patching, the filenames, and the contents of the change. This is the preferred way to keep track of patches and makes it easier for others to find and test your patch.

  2. To apply a patch, go to the proper directory and run:

    patch < issuepatch.diff

  3. Always include a message with your patch with the following information:

    • A description of what problem or defect you are attempting to fix, and the steps to reproduce it, if possible.
    • A description of what the behavior should be with the patch in place.
    • A description of how the patch works, if reasonable. If a significant amount of code is involved, include within the message that you agree to let the patch be used under the applicable project license as part of the IDE's code.

The developer responsible for the section of code affected should either apply the patch and mark the defect (if there is one registered) as fixed, or reply with an objection if it does not seem safe, does not appear to fix the problem, or there is not really a problem to begin with. Notifications of any changes to the issues database, as well as CVS check-ins, are automatically sent to the appropriate issue assignee/cc'd and CVS mailing lists, so you can monitor whether the patch has been applied. Be sure to subscribe to at least the CVS and issue mailing lists for the module you are working on.

If you do not know exactly how to fix a problem, but have an idea about what is causing it, you can post a message about this on the developer discussion list for other project members' suggestions or to find someone who knows how to fix it.