From owner-freebsd-ports Thu Jul 13 18:37:13 1995 Return-Path: ports-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id SAA09223 for ports-outgoing; Thu, 13 Jul 1995 18:37:13 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id SAA09216 for ; Thu, 13 Jul 1995 18:37:09 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id SAA29557; Thu, 13 Jul 1995 18:36:54 -0700 From: "Rodney W. Grimes" Message-Id: <199507140136.SAA29557@gndrsh.aac.dev.com> Subject: Re: diffs and checksums To: asami@cs.berkeley.edu (Satoshi Asami) Date: Thu, 13 Jul 1995 18:36:54 -0700 (PDT) Cc: knarf@nasim.cube.net, freebsd-ports@freebsd.org In-Reply-To: <199507140113.SAA25137@forgery.CS.Berkeley.EDU> from "Satoshi Asami" at Jul 13, 95 06:13:12 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1812 Sender: ports-owner@freebsd.org Precedence: bulk ... > Satoshi > > P.S. By the way, is there some way to convert a -u diff to -c or vice > versa? I took a look at man pages of diff and patch, but > couldn't find anything.... patch < unidiff; diff -c original new :-), gross, but what I do when I have one format that does not make a whole lot of since and want to look at in the other format to see if that makes more since to me. Unlike the strongly sided one way or the other folks here I like that there are both formats, some changes present themselves much clearer in one format than the other. I tend to use the one that makes the patch as obvious as possible. One bugger in diff -c is that it gets confused some time and produces junk like alah alah alah ! blah blah blah clah clah clah ---- alah alah alah ! blah blah blah ! dlah dlah dlah ! elah elah elah clah clah clah It usually does this when there is a blank line near the change, which in a lot of C code is a quite common thing :-(. Now if you want something really horrible to read, try the diff -an that RCS uses to store deltas, BLEHH! But, compact! Perhaps there is the answer to Satoshi's conversion problem, as rcs actuall stores diff -an, but can produce either diff -c or diff -u, but I it does this by creating the two versions of the files using back walking diff -an down the versions, and then does the proper diff on the 2 tmp files. Another way to do what I did above using rcs would be: ci file co -l file patch