I'm trying to prepare a patch to submit to the kernel PPP people.  I'm
having trouble figuring out how to generate this properly.   As a test,
I created  two files "abc" and "def", with contents the same as the file
names.  If I generate a diff using this command:

diff -u abc def > abc.diff

I end up with this diff output:

--- abc 2004-06-13 00:22:41.825421456 -0400
+++ def 2004-06-12 00:15:52.000000000 -0400
@@ -1 +1 @@
-abc
+def

Running "patch <abc.diff" patches the file abc without a problem, as
expected.

However, if I now create two subdirectories called "from" and "to", each
containing a file called "aaa"  (with different contents) and run 

diff -u from to > sub.diff

I end up with this:

--- from/aaa    2004-06-13 00:27:54.349910512 -0400
+++ to/aaa      2004-06-13 00:28:15.889635976 -0400
@@ -1 +1 @@
-abc
+def

Now running patch produces this:

patch -u -p0 <sub.diff
patching file to/aaa
Reversed (or previously applied) patch detected!  Assume -R? [n]

The diff file looks identical to the one generated for two files in the
same directory, but patch is reporting that it is trying to patch the
"to" file instead of the "from" file.  I've googled and looked for
mailing lists to no avail.   Can someone explain what I've done
incorrectly to confuse patch, and how I'm supposed to do this?  Thanks
much.

-- 
Guy Rouillier

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to