Difference between revisions of "HOWTO Patch"

From Creative Commons
Jump to: navigation, search
(fleshed out)
 
(Removed 1st 'c' from "/patch/to/patchfile.patch"... too many "patch"es)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:Developer]]
 
[[Category:Developer]]
[[Category:howto]]
+
[[Category:HOWTO]]
  
 
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. [http://en.wikipedia.org/wiki/Patch_%28computing%29]
 
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. [http://en.wikipedia.org/wiki/Patch_%28computing%29]
Line 33: Line 33:
  
 
<pre>
 
<pre>
patch /path/to/file /patch/to/patchfile.patch
+
patch /path/to/file /path/to/patchfile.patch
 
</pre>
 
</pre>
  
 
== HOWTO Submit a Patch ==
 
== HOWTO Submit a Patch ==
 +
 +
Before submitting:
 +
 +
# Make sure that your code works and test and retest
 +
# Check over the patch and make sure it includes code you intended
 +
# (OPTIONAL) Re-check out the module you want to make changes to, apply your patch, and then make sure it all work.
  
 
Go to the [http://sourceforge.net/tracker/?group_id=80503&atid=559968 cctools Sourceforge.net path page], and then [http://sourceforge.net/tracker/?group_id=80503&atid=559968 submit your patch along with comments].
 
Go to the [http://sourceforge.net/tracker/?group_id=80503&atid=559968 cctools Sourceforge.net path page], and then [http://sourceforge.net/tracker/?group_id=80503&atid=559968 submit your patch along with comments].

Latest revision as of 12:29, 5 February 2010


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 /path/to/patchfile.patch

HOWTO Submit a Patch

Before submitting:

  1. Make sure that your code works and test and retest
  2. Check over the patch and make sure it includes code you intended
  3. (OPTIONAL) Re-check out the module you want to make changes to, apply your patch, and then make sure it all work.

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