From: H.Merijn Brand Date: Fri, 23 Aug 2002 15:27:48 +0000 (+0200) Subject: Re: p5p patches X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a92fa57ec8cc37e9a1d49b8ea05814e9342ee6f;p=p5sagit%2Fp5-mst-13.2.git Re: p5p patches From: "H.Merijn Brand" Message-Id: <20020823152535.D3EA.H.M.BRAND@hccnet.nl> p4raw-id: //depot/perl@17772 --- diff --git a/Porting/patching.pod b/Porting/patching.pod index 14b39e2..4176b3f 100644 --- a/Porting/patching.pod +++ b/Porting/patching.pod @@ -63,6 +63,10 @@ respectively, unified diffs (where the changed line appears immediately next to the original) and context diffs (where several lines surrounding the changes are included). See the manpage for diff for more details. +When GNU diff is available, the pumpkins would prefer you use C<-u -p> +(--unified --show-c-function) as arguments for optimal control. The +examples below will only use -u. + The preferred method for creating a unified diff suitable for feeding to the patch program is: @@ -92,8 +96,15 @@ diffs. Some examples using GNU diff: % diff -bu a/file b/file # show function name in every hunk (safer, more informative) + % diff -u -p old/file new/file % diff -u -F '^[_a-zA-Z0-9]+ *(' old/file new/file + # show sub name in perl files and modules + % diff -u -F '^sub' old/file.pm new/file.pm + + # show header in doc patches + % diff -u -F '^=head' old/file.pod new/file.pod + =item Derived Files Many files in the distribution are derivative--avoid patching them. @@ -344,6 +355,11 @@ found in the headers). This helps reconcile differing paths between the machine the patch was created on and the machine on which it is being applied. +Be sure to use the Larry Wall version of patch. Some Operating Systems +(HP-UX amongst those) have a patch command that does something completely +different. The correct version of patch will show Larry's name several +times when invoked as patch --version. + =item Cut and paste B cut and paste a patch into your editor. This usually clobbers @@ -383,12 +399,14 @@ to apply as possible. Keep that in mind. 8-) =head1 Last Modified -Last modified 21 January 1999 +Last modified 22 August 2002 +H.Merijn Brand +Prev modified 21 January 1999 Daniel Grisinger =head1 Author and Copyright Information -Copyright (c) 1998, 1999 Daniel Grisinger +Copyright (c) 1998-2002 Daniel Grisinger Adapted from a posting to perl5-porters by Tim Bunce (Tim.Bunce@ig.co.uk).