[wp-hackers] WP Patch day?

Kitty kitty at mookitty.co.uk
Sat Jul 24 21:00:30 UTC 2004


On Sat, 2004-07-24 at 11:00 +0200, Tara Star wrote:

> a link to "patches for dummies" would be nice. I know how to modify 
> things in my own install, but how does one create a patch?

For windows, "WinMerge" is about the best there is, it open-source. On
Linux, it's built in, and if you have KDE, kompare is a good GUI diff
program.

For tutorials:
From Apache.org, a good overview of the process:
http://cocoon.apache.org/2.1/howto/howto-patch.html

and the "Contributing to Open Source Projects HOWTO":
http://www.kegel.com/academy/opensource.html

Read both, and you'll have a good idea of the process, and how best to
use it with WP.

But here's some tips:
Keep a clean copy of the latest CVS, so you'll have a place to start
from, make your changes, make sure they work. Then do a 'save as' on
your file with a new prefix or suffix (I usually add a prefix describing
what I'm doing, i.e. options-writing.php becomes
lang-options-writing.php when I'm ready to diff.)

Now, get a clean copy of the original file, and replace the file you
modified. Now if you have a Linux command line, in that folder, type
'diff -u3 -r options-writing.php -r lang-options-writing.php >
lang-patch.diff' and you'll have a new file, lang-patch.diff, containing
the changes that you made ready to apply.

For a graphical program, open the files with the program, and there
should be an menu option to create a diff file. The programs vary, and
you'll have to read the instructions to find out exactly how to do it.

Hope this helps, and I'll post it to the wiki too.
-- 
Cheers!
Kitty <kitty at mookitty.co.uk>
http://blog.mookitty.co.uk/
http://mookitty.co.uk/devblog/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/hackers_wordpress.org/attachments/20040724/161e2c8d/attachment.bin


More information about the hackers mailing list