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]
Other format: [Raw text]

Re: [tree-ssa] More patch reversals. Branch closed temporarily


>>>>> "Jason" == Jason Merrill <jason@redhat.com> writes:

Jason> Patch reversal is still pretty easy with cvs update -j.

Here's a script that takes a cvs commit message and generates a new
script which reverts the commit.  It isn't perfect, and it hasn't been
heavily tested, but it ought to work ok.  If you modify it, please
send me the updates.

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]+\&r1=([^&]+)\&r2=([^&\n]+)$,)
{
    $dir = $1;
    $file = $2;
    $r1 = $3;
    $r2 = $4;

    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]