This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: Please post real patches (Was: [gui][patch] fix jcomponent action reset)


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


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