I regularly find myself digging up the proper nodes to explain to someone on the forums how to apply a patch either from a shell command line or locally on a windows machine.
I also find myself always needing to dig up the information on the proper command line syntax for generating a patch for submission.
So here's the scoop, so I don't have to do all that oh-so-complicated searching everytime ;)
Creating a patch:
diff -uF^function old.module new.module > file.patch
More info available at http://drupal.org/diffanpatch
Applying a patch from shell:
patch old.module < file.patch
(I find that the -p option is rarely needed)
Applying a patch on a local windows box to upload via FTP:
Discussion of various means here






Post new comment