Path: utzoo!attcan!uunet!husc6!think!ames!killer!pollux!dalsqnt!rpp386!pigs!haugj From: haugj@pigs.UUCP (The Beach Bum) Newsgroups: comp.unix.wizards Subject: Re: context diff and patch Summary: And I'll still disagree with you ... Message-ID: <171@pigs.UUCP> Date: 18 Jun 88 19:46:33 GMT References: <954@fig.bbn.com> <8122@brl-smoke.ARPA> Organization: Big "D" Home for Wayward Hackers Lines: 37 In article <8122@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: > In article <954@fig.bbn.com> rsalz@bbn.com (Rich Salz) writes: > >Using diff -e and ed are fine, as long as you are able to (naively) assume > >that nobody will add or delete a line to what you put out. > > What I said was: In any context where I would trust "patch", I would also > trust "ed" using the output of "diff -e", which is generally much less output. > > I would trust NEITHER "ed" nor "patch" when modifications have been made > to the original code. "patch" may be somewhat more likely to succeed in > such a case, but it obviously cannot be guaranteed to work right. I push `patch' and context diffs quite further than even Rich $alz does. The database system we run here (HECI Exploration Co. Inc.) consists of several hundred different Informix 3.30 ACE reports. Of those, many are very similiar to each other with only small differnces due to sort order, page layout, etc. To make my job easier, whenever I fix a bug in one report, I take the context diff from that bugfix and try to apply it to all of the other almost identical reports. This helps to keep the similiar reports more similiar, while fixing bugs where they may not have been known about. While this frequently does not work 100%, I can still look in the rejects file and see what turned up. Also, because of the context information which is present, similiar lines are distinguishable from each other based on the surrounding context. I consider this application of diff and patch to be far from useless, which as I recall was Doug's original objection. - John. -- The Beach Bum Big "D" Home for Wayward Hackers UUCP: ...!killer!rpp386!jfh jfh@rpp386.uucp :SMAILERS "You are in a twisty little maze of UUCP connections, all alike" -- fortune