This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [gui] Implement RescaleOp
- From: Tom Tromey <tromey at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Mark Wielaard <mark at klomp dot org>, Michael Koch <konqueror at gmx dot de>,java-patches at gcc dot gnu dot org, Jerry Quinn <jlquinn at optonline dot net>
- Date: 04 Oct 2004 15:20:40 -0600
- Subject: Re: [gui] Implement RescaleOp
- References: <4158F2B6.7010700@optonline.net><m3r7omtmw6.fsf@localhost.localdomain><415A196C.9040702@optonline.net> <200409301119.35829.konqueror@gmx.de><16731.53503.397693.334247@cuddles.cambridge.redhat.com><1096537307.1091.10.camel@localhost><16731.55142.234311.267025@cuddles.cambridge.redhat.com><1096637405.3888.11.camel@localhost><16737.15741.999964.33819@cuddles.cambridge.redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> Of course, this problem is caused by the fact that CVS doesn't have
Andrew> atomic multi-file commits. However, it ought to be possible to write
Andrew> a tool that extracts patches from CVS logs, which is presumably what
Andrew> is really needed.
Yeah, this has been done several times. It is also really trivial to
do this given the cvs commit email. Appended is a patch reverter that
works on this principle. The one drawback is that it is a bit slow.
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";
}
}