This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: An excessive commit - check recent changes to alocal, configure, all any and count
- From: Tom Tromey <tromey at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org
- Date: 30 Apr 2005 15:07:25 -0600
- Subject: Re: An excessive commit - check recent changes to alocal, configure, all any and count
- References: <001301c54db6$34db2190$0400000a@Paul>
- Reply-to: tromey at redhat dot com
>>>>> "Paul" == Paul Thomas <paulthomas2@wanadoo.fr> writes:
Paul> In attempting to commit the matmul patch to libfortran and the
Paul> corresponding testcase a few minutes ago, I seem to have screwed up:
Paul> In spite of updating and diffing before committing, I have done
Paul> something to alocal.m4, configure, all, any and count.
You may find the appended script useful. Feed it a cvs commit message
and it generates a (slow :-) script to revert a patch. So just:
cat message | revert-patch | sh
Tom
#! /usr/bin/perl -n
# This takes a gcc-style cvs commit message, extracts the URLs from
# it, and generates a small shell script to revert the patch.
if (m,http://.*\.cgi/(.+)/([^/]+)\?cvsroot=[a-z]+(\&only_with_tag=[^&]+)?\&r1=([^&]+)\&r2=([^&\n]+)$,)
{
$dir = $1;
$file = $2;
$r1 = $4;
$r2 = $5;
if ($file eq 'ChangeLog') {
# Don't revert ChangeLog entries.
} elsif ($r1 eq 'NONE') {
print "cvs rm -f $dir/$file\n";
} else {
print "(cd $dir; cvs update -j$r2 -j$r1 $file)\n";
}
}