On Mon, Sep 18, 2000 at 02:41:03PM +1000, Allan Rae wrote:
> On Fri, 15 Sep 2000, Amir Karger wrote:
> 
> > On Fri, Sep 15, 2000 at 01:48:42PM +1000, Allan Rae wrote:
> > > 
> > > I have modified GNU diff to be able to emulate `cvs diff`.  This allows
> > > anyone with two copies of a cvs snapshot to modify one and generate a
> > > diff between the two that is the equivalent of what they'd get if we gave
> > > them cvs access.
> > 
> > are you sure one couldn't hack
> > together a perl script that would use diff as it already stands? 
> 
> I tried this with a shell script.  It was ugly and it required me to
> identify which files were present in one directory and not the other
> (something diff already does for directory comparisons) and call diff on
> each individual pair of files like:
>       diff -u dir1/file1 /dev/null

Sounds like this worked, even if it was ugly. Still not as ugly as requiring
everyone to use a patched version of diffutils. (What happens when they
upgrade diffultils? What if someone else wants them to use a differently
patched version?) I guess if you sent in your patches to the diffutils
folks, that might make more sense. And might even be useful since lots of
people in the world who use diff also want to use it for cvs-diff-like
things.

> Either way required changes to diffutils sources so I wrote the one that
> made better sense to me.  

I don't understand why the shell script you described required changing
diffultils.

Alternatively, if you're worrying about ignoring the right files, why not
write a script that creates a file of files to ignore in the diff, and then
call diff -X? 

-Amir

Reply via email to