[theora-dev] Using 'patch' (was Re: Boring but useful VP3/QT patches)
Eric M. Kidd
Eric.M.Kidd at Dartmouth.EDU
Fri Jul 19 07:51:47 PDT 2002
--- "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
Codecs/quicktime/.
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
appreciated.
--- 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.
Cheers,
Eric
--- >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
mailing list