0

I generated a patchfile of 2 directories using this command:

diff -ur source-20110125 source > mailpatch3.patch 

Now I would like to apply the patch, doing this:

patch -p1 < mailpatch3.patch 

But it then asks me for the file to patch. Why?

Something that looks strange to me in the patch file: there are a lot of "common subdirectories" lines. Like this:

Common subdirectories: source-20110125/ac_depository and source/ac_depository Common subdirectories: source-20110125/ac_depository_jar and source/ac_depository_jar Common subdirectories: source-20110125/_backoffice and source/_backoffice Common subdirectories: source-20110125/_csvexport and source/_csvexport Common subdirectories: source-20110125/_foundation and source/_foundation Common subdirectories: source-20110125/_impex and source/_impex 

And I don't really know why they're there.

The rest of the patch looks normal.

1 Answer 1

0

Most likely you have the wrong -p setting for trimming prefixes from your paths. If you were below the two source directories when generating the patch, then you should be inside the source directory to apply the patch with -p1.

1
  • I should only have to strip one. However, for the sake of making sure, I've tested -p 0 to 9. Nothing worked. Commented Feb 9, 2011 at 9:20

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.