From: CSBVAX::MRGATE!mdb@silvlis.com@SMTP 8-OCT-1988 19:45 To: ARISIA::EVERHART Subj: Re: Using 'patch' with subdirectories Received: from SUN.COM by prep.ai.mit.edu; Sat, 8 Oct 88 16:57:00 EST Received: from sun.Sun.COM by Sun.COM (4.0/SMI-4.0) id AA27644; Sat, 8 Oct 88 15:32:09 PDT Received: from silvlis.com by sun.Sun.COM (4.0/SMI-4.0) id AA20736; Sat, 8 Oct 88 15:36:28 PDT Received: from amadeus.silvlis.com by silvlis.com (4.0/SMI-3.2-880922) id AA03843 for rang@cpswh.cps.msu.edu; Sat, 8 Oct 88 15:31:23 PDT Received: by amadeus.silvlis.com (4.0/SMI-3.4-881006) id AA22149; Sat, 8 Oct 88 15:31:11 PDT Date: Sat, 8 Oct 88 15:31:11 PDT Message-Id: <8810082231.AA22149@amadeus.silvlis.com> To: Anton Rang Cc: info-gnu-emacs@prep.ai.mit.edu From: Mark D. Baushke Sender: mdb@silvlis.com In-Reply-To: Your message of 08 Oct 88 04:45:50 +0000. <806@cps3xx.UUCP> Subject: Re: Using 'patch' with subdirectories > Date: 8 Oct 88 04:45:50 GMT > From: sun!tut.cis.ohio-state.edu!mailrus!eecae!cps3xx!usenet (Usenet file owner) > X-Signature: Anton Rang > > Is there some trick to using the 'patch' program so that it finds all > the appropriate files to patch, even if they aren't in the current > directory? I've successfully used it by having it a level up from the > tree I'm patching, and typing in all the filenames (yuck). I tried to > use it by moving the patch file into the top of the directory tree, > and it really got screwed up. It doesn't understand subdirectories at > all (as far as I can tell). No trick at all is necessary. Use the "-p" option to let it use the path given in the context diff. For example, % mv dist-18.50 dist-18.51 % patch -N -p < diff-18.50-18.51 would apply the updates for 18.51. > Is there a newer version of 'patch' which fixes this, and if so, > where can I get a copy? Which version of patch are you using? I am using patch 2.0 [Patch level: 11]. This works well enough for GNU Emacs updates although it might not be the latest patch level available. (Instructions for getting a copy given below.) > Or else, can anyone tell me what I'm doing > wrong? Do I need to rename the tree before applying the patch (i.e. > dist-18.50 --> dist-18.51 before patching)? Yes, you should rename the old directory (or copy it) first. Patch was written by Larry Wall . It was originally posted to comp.sources.unix in volume7 and should be available from archive sites such as uunet.uu.net. If you don't have FTP access, it should also be possible to get it from the info-server@sh.cs.net. Send a mail message with the following body: Request: mod.sources Topic: help Topic: patch2 Request: end and you will be sent 3 shar files which contain the release of patch 2.0. (Note: I do not know if this release has any patches applied.) The following appears in the comments of patch #11. # If you are missing previous patches they can be obtained from me: # # Larry Wall # lwall@jpl-devvax.jpl.nasa.gov # # If you send a mail message of the following form it will greatly speed # processing: # # Subject: Command # @SH mailpatch PATH patch 2.0 LIST # ^ note the c # # where PATH is a return path FROM ME TO YOU in Internet notation, and # LIST is the number of one or more patches you need, separated by spaces, # commas, and/or hyphens. Saying 35- says everything from 35 to the end. # # You can also get the patches via anonymous FTP from # jpl-devvax.jpl.nasa.gov (128.149.8.43). Enjoy! ------------------------------------------------------------------------------ Mark D. Baushke Internet: mdb%silvlis.com@sun.com Silvar-Lisco, Inc. Nameservers: mdb@silvlis.com 1080 Marsh Road Usenet: {pyramid,sun}!silvlis!mdb Menlo Park, CA 94025-1053 Telephone: +1 415 853-6411 / +1 415 969-8328