Diff file trouble applying?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Charley

    Diff file trouble applying?

    I've got a diff file that I think is a patch for a bunch of file in a
    directory. How do I apply this file?

    I thought it was

    #patch myfile.diff


    But that does nothing. I must be missing something. The diff file
    contains diff's for a nuch of files, not just a single file. Do I need a
    copy of the original file as was or does the diff file contain everything
    it needs to make the patch(s)?

    J

  • Andy Hassall

    #2
    Re: Diff file trouble applying?

    On Sat, 11 Oct 2003 20:13:27 GMT, Charley <johnson@jhilb. com> wrote:
    [color=blue]
    >I've got a diff file that I think is a patch for a bunch of file in a
    >directory. How do I apply this file?
    >
    >I thought it was
    >
    >#patch myfile.diff
    >
    >But that does nothing. I must be missing something. The diff file
    >contains diff's for a nuch of files, not just a single file. Do I need a
    >copy of the original file as was or does the diff file contain everything
    >it needs to make the patch(s)?[/color]

    Usually it's:

    patch -p0 < myfile.diff

    Or possibly -p1 depending on what directory you're in and whether the patch
    included a top-level directory or not.

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    • Charley

      #3
      Re: Diff file trouble applying?

      Andy Hassall <andy@andyh.co. uk> wrote in
      news:ebpgovgegt bnb4mhppln110it 2er9jctl3@4ax.c om:

      OK, thanks, I'll give that a try.

      [color=blue]
      > On Sat, 11 Oct 2003 20:13:27 GMT, Charley <johnson@jhilb. com> wrote:[/color]

      [color=blue]
      >[color=green]
      >>I've got a diff file that I think is a patch for a bunch of file in a
      >>directory. How do I apply this file?
      >>
      >>I thought it was
      >>
      >>#patch myfile.diff
      >>
      >>But that does nothing. I must be missing something. The diff file
      >>contains diff's for a nuch of files, not just a single file. Do I
      >>need a copy of the original file as was or does the diff file contain
      >>everything it needs to make the patch(s)?[/color]
      >
      > Usually it's:
      >
      > patch -p0 < myfile.diff
      >
      > Or possibly -p1 depending on what directory you're in and whether the
      > patch
      > included a top-level directory or not.
      >
      > --
      > Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
      > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
      >[/color]

      Comment

      Working...