This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: An excessive commit - check recent changes to alocal, configure, all any and count


>>>>> "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";
    }
}


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