Difference between revisions of "HOWTO Patch"

From Creative Commons
Jump to: navigation, search
(fleshed out)
(No difference)

Revision as of 21:52, 26 April 2006

In computing, a patch is a small piece of software designed to update or fix problems with a computer program. This includes fixing bugs, replacing graphics and improving the usability or performance. Though meant to fix problems, badly designed patches can sometimes introduce new problems. [1]

The general rule for Creative Commons development is for a developer to submit one good patch before getting access to the sourceforge.net project and unrestricted access to SVN. So, please submit a great patch, we will help you with formatting it properly, and then afterwards, we will give you proper access to the development trees.

HOWTO Create a Patch

You need to use a program called diff on most computers to compare the changes from one or more files against another set of one or more files. From this, one gets diff output.

The best is to create patches against the most current development version. This is done like this inside the checked out module from SVN:

svn diff > /path/to/patchfile.patch

For an individual file:

svn diff changedfilename > /path/to/patchfile.patch

Non SVN way to Patch

For the entire checked out module:

diff -up oldfile newfile > /path/to/patchfile.patch

HOWTO Apply a Patch

patch /path/to/file /patch/to/patchfile.patch

HOWTO Submit a Patch

Go to the cctools Sourceforge.net path page, and then submit your patch along with comments.

Here is help with sourceforge.net's patch system.

External Links