On Fri, Sep 07, 2007 at 02:51:33AM +1000, Darren Freeman wrote:

> On Thu, 2007-09-06 at 18:23 +0200, Enrico Forestieri wrote:
> > On Fri, Sep 07, 2007 at 12:28:45AM +1000, Darren Freeman wrote:
> > 
> > > I have been getting away with "patch <file.diff" and entering the
> > > filenames manually. However in that one case, it decided to use the
> > > Makefile.am in a higher directory than the one it should have, hence not
> > > finding the section to modify.
> > 
> > That's error prone. You have to look at the paths in the patch file
> > and count how many path elements must be elided (number of slashes /)
> > such that the file can be accessed from your current dir. Then, you
> > should specify this number using the -p option. Most patches you
> > find on this list should be applied using -p0, so the command should be
> > 
> > patch -p0 < file.diff
> 
> Hmmm... how embarrassment.
> 
> I forgot that -p0 makes things work properly. It's annoying that it
> doesn't behave this way by default. I thought the resulting troubles
> were because the patch came from svn, but alas it works fine with the
> above.
> 
> Reverted and reapplied the patch. Probably missed client/Makefile.am the
> first time around because now it's compiled OK :) Sorry to worry you
> like that.

So, Jean-Marc, would you like to pursue some other option or may I
apply my patch? It works for me, works for Darren, and I am sure that
it also works for José, even if he is reticent ;-)

-- 
Enrico

Reply via email to