[theora-dev] Using 'patch' (was Re: Boring but useful VP3/QT patches)
Daniel B. Miller
dan at on2.com
Fri Jul 19 08:25:45 PDT 2002
thanks. A local UNIX-guru explained the -p0 option to me, though he had
no explanation other than "if it doesn't work with -p1, try -p0"!!
Gotta love the voodoo.
<p> ___ Dan Miller
(++,) CTO and founder, On2 Technologies
On 19 Jul 2002, Eric M. Kidd wrote:
> --- "Daniel B. Miller" wrote:
> It looks to me like patch is trying to put each .cvsignore in the vp32
> directory rather than the specified subdirectories such as
> It seems like I need some option to get patch to use the 'Index:'
> commands. I looked at the man page, it goes on about how patch tries to
> derive the filenames, but I am still confused. Any help would be
> --- end of quote ---
> Sorry, I forgot how counter-intuitive 'patch' can be. My patches are automatically generated by CVS, which means they contain location lines of the form:
> --- Codecs/quicktime/Generic/dxlqt_dx.cpp 9 Jul 2002 09:30:34 -0000
> +++ Codecs/quicktime/Generic/dxlqt_dx.cpp 10 Jul 2002 18:44:42 -0000
> To apply these patches:
> 1) cd to the vp32 directory
> 2) type 'patch -p0 < filename.diff'.
> The '-p0' argument tells 'patch' that lines beginning with '---' and '+++' can be used after striping 0 directory levels.
> If, on the other hand, somebody makes patches using 'diff', you'll get location lines like this:
> --- vp32-old/Codecs/quicktime/Generic/dxlqt_dx.cpp 9 Jul 2002 09:30:34 -0000
> +++ vp32-new/Codecs/quicktime/Generic/dxlqt_dx.cpp 10 Jul 2002 18:44:42 -0000
> In this case, you need to use '-p1' to strip off 1 directory level.
> In any case, the 'Index' lines are generated by CVS, and are completely ignored by 'patch'. The 'patch' program was written by Larry Wall, so it tends to do clever things, such as ignoring lines that don't look like a standard diff.
> --- >8 ----
> List archives: http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
> containing only the word 'unsubscribe' in the body. No subject is needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
<p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Theora-dev