By bobo on
How do I manually edit a patch? I am trying to add the book_module patch to allow a book to show on the front page from the start rather than just when you're viewing a page. There are "-"'s and "+"'s and I get that you switch them around - but what is an @ ... it doesn't seem to be that straightforward but I don't know how to add a patch with a program on windows.... /-:
Yours,
bobo
Comments
What is what in patch file:
(i wanted to post example but it wouldn't allow me because of "suspicious data" :(
That's all :)
There are also other formats of patch, but the one explained above is probably most often used.
see handbook
there _is_ a port of patch for Windows...
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.
Install cygwin and run patch
You really don't want to edit patch files by hand. Heck, the thought of it turns my stomach...
Best advice if you are using Windows (besides to use Linux or BSD instead....) is to install the free Cygwin tools, which lets you not only run patch, but also run any bash or other Unix shell scripts as well.
You can get it from Redhat's web site: http://sources.redhat.com/cygwin/. The installer makes it easy to install patch. Once you have it installed, just cd into the top level of what you want to patch (typically, the top level of a copy of your Drupal install), and do something like this:
You may have to play with that number after -p. For details, you can check the man page for patch (you can install Unix man pages using Cygwin as well).
Rob
Torenware Networks
Rob Thorne
Torenware Networks
Applying patch by hand
Actually applying patch by hand (which is what bobo asked about, if i understood him correctly) is not so bad. Writing patch file is probably much more work ;)