I'm running into trouble using patch. I have 2 folders with many subfolders and files.
diff -ur backup/www/ www/ > sync.patch
Next, I'm trying to apply the patch.
patch < sync.patch
It asks me File to patch:
as you can see.
|diff -ur ./backup/www/members/categorize.php ./www/members/categorize.php
|--- ./backup/www/members/categorize.php 2012-12-13 15:19:41.000000000 -0500
|+++ ./www/members/categorize.php 2012-10-15 23:32:12.000000000 -0400
--------------------------
File to patch:
The file ./www/members/categorize.php exists.
Highlight your project to select it. From the main menu, select menu Tools -> Apply Diff Patch. In the resulting dialog, browse to your patch file, select it, and press the Patch button.
The patch command reads a source file's instructions on how to change a file, then applies the changes. The source file contains difference listings (or diff listings) produced by the diff -c or -u command, and one or more sets of diff command output, customarily called hunks.
You probably need to investigate the -p
flag for patch
, which controls the way that directory prefixes are treated. See the man page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With