This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Please post real patches (Was: [gui][patch] fix jcomponent action reset)
- From: Tom Tromey <tromey at redhat dot com>
- To: Mark Wielaard <mark at klomp dot org>
- Cc: graydon hoare <graydon at redhat dot com>,"java-patches.gcc.gnu.org" <java-patches at gcc dot gnu dot org>
- Date: 05 Sep 2004 12:26:08 -0600
- Subject: Re: Please post real patches (Was: [gui][patch] fix jcomponent action reset)
- References: <opsdedxe1btgmzw2@dub.venge.net><1094330730.2678.38.camel@localhost.localdomain>
- Reply-to: tromey at redhat dot com
>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:
Mark> Having patches in this format makes merging these changes into another
Mark> branch or to/from GNU Classpath really hard. In the best case miss some
Mark> of the indentation, or I use other indentation than the patch submitter.
Mark> In the worst case it doesn't apply and I have to hunt down some remote
Mark> code repository to get the actualy patch or do the merge completely by
Mark> hand.
It is pretty easy to write a script that takes the commit message and
turns it into the patch that was actually checked in. So instead of
going by what was sent to java-patches, you could look at the commit
list instead.
The appended script works this way to revert a given commit.
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";
}
}