context diff and patch

The Beach Bum haugj at pigs.UUCP
Sun Jun 19 05:46:33 AEST 1988


In article <8122 at brl-smoke.ARPA>, gwyn at brl-smoke.ARPA (Doug Gwyn ) writes:
> In article <954 at fig.bbn.com> rsalz at 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 at rpp386.uucp :SMAILERS

 "You are in a twisty little maze of UUCP connections, all alike" -- fortune



More information about the Comp.unix.wizards mailing list