I want to patch the archiver.module, but cannot understand how to do it. I have read the information on the Drupal site and downloaded the patch.exe, but I don't know how to use it.
For instance, I tried this:

* place the patch file in the same directory as the file that you want to patch.
* issue the command:
patch -b < file_name.patch
* You're Done - Check the changes to the site.

I placed both files in c:\. I patch.exe I wrote:

patch -b < node.module.patch

and pressed Enter. Nothing happens. What should I do?

Comments

luco’s picture

hey there Razzel.

I bumped onto this meself, and after coing around in circles I ended up patching by hand. it's no rocket science ;]

rule of thumb: open both the patch & the module with your favourite text editor and you'll see lines with a plus (+) and a minus (-). erase lines with a minus and add the ones with a plus. usually the patches apply to files with a '.module' extension.

I recommend using the search function to locate them lines quickier. any text editor has a search function, it's usually ctr + F.

here's two scenarios this might happen:
1) there's lines to replace
you'll see something like this:

-	yadda yadda
+	blah blah

simply search for "yadda yadda", erase the whole line and add the line that reads "blah blah"

2) there's lines to add
you'll see something like this:

	yadda yadda
+	blah blah
	quelque chose

usually the patch contains lines above and below the 'plus' (+) lines with no plus or minus. this helps you seek out where to insert the change. find the string "yadda yadda" and you'll know where to start.

REMEMBER
back up yer files and don't do patching on an actual production site. be careful! test well!

hope this info isn't all that late for you.

regards,
Luciano

_________________________

"There is no off position on the genius switch."
- David Letterman