This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Producing CVS diffs


Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de> writes:

> How can I produce diffs against the CVS tree that work well with patch?
> When I do 'cvs -z9 diff -u' in the gcc directory, I get headers that
> look like
> 
> Index: cp/tree.c
> ===================================================================
> RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/tree.c,v
> retrieving revision 1.25
> diff -u -p -r1.25 tree.c
> --- tree.c	1998/03/12 00:29:16	1.25
> +++ tree.c	1998/03/17 20:57:57

I always use a short perl script for this. 

#!/usr/bin/perl -p

if (/^RCS.*cvsfiles\/(.*),v/) { $path=$1; }
if (/^\+\+\+/ || /^\-\-\-/) { s/(...) [^ ]+(.*)/$1 $path $2/; }
if (/^diff/) { s/ [^ ]+$/ $path\n/; }
if (/^\?/) { $_=""; }


-Andi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]