[gui] Implement RescaleOp
Tom Tromey
tromey@redhat.com
Mon Oct 4 21:23:00 GMT 2004
>>>>> "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";
}
}
More information about the Java-patches
mailing list