In a recent note, Edward Jaffe said: > Date: Mon, 31 Jul 2006 17:10:59 -0700 > > Eric N. Bielefeld wrote: > > Your probably right that some automated process is used to create the > > update files. My question is how the updates can be merged in to the > > main source without something like a line number. The only thing I > > can think of is it would use a relative record number from the > > beginning of the file. With a line number in 73-80, I can visually > > see that the numbers are in sequence. Without a line number, how do > > you know that the merge of the diff file with the source has it in the > > correct sequence? > > http://bama.ua.edu/cgi-bin/wa?A2=ind0607&L=ibm-main&P=211314 > "diff" generates and "patch" is alert to both
o Relative line number o Context This is identical to the information used by AMASPZAP: displacement and verified context. Are you comfortable with AMASPZAP? "patch" does not require the relative line number match exactly. if another patch has introduced a shift, "patch" will report something such as "Chunk 42 succeeded with offset 7." I haven't experimented to see whether when there are two candidate targets, "patch" reliably chooses the one with the lesser offset. The worst case is when there are two identical target areas and one of them is patched by patch A. Patch B then adds or deletes lines so the other area is at the offset targeted by patch A, which then applies the patch to the wrong target. This is about as improbable as my envisioned scenario in which IEBUPDTE cold interleave lines introduced by two independently developed patches. "patch" does not require that the context match exactly. It reports with a message such as "Chunk 43 succeeded with fuzz 2" where 2 is the number of unmatched lines in the context. "patch" requires that lines being replaced match exactly (subject to an option that causes white space to be ignored, or another that causes each nonempty span of white space to be treated as a single blank for matching purposes). Chunks that fail are written to an exception file so the programmer may resolve them by intelligent inspection. The primary output file is written updated with chunks that succeed. "patch" provides a greater repertoire of warnings for suspicionable updates than IEBUPDTE, and, through the exception file, greater assistance to the programmer for recovering for failures. It's widely used with great success, though, as Shmuel says, it has its pitfalls. Like foreign cuisine, it should be approached with an open mind. -- gil -- StorageTek INFORMATION made POWERFUL ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

