You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/08/12 08:39:51 UTC

patch generation automation

Here is a script to save you typing to generated patches ready to be
posted to the list, especially if you create new files. it's very simple
but saves a lot of time when you need to clean the patch and regenerate
the patch again and again.

Should I put it in ./util?

#!/usr/bin/perl -w

# this script creates a diff against CVS
# and against /dev/null for all files in ARGV
# and prints it to STDOUT
#
# e.g.
# getdiff t/modules/newtest t/response/TestModules/NewTest.pm \
# > newtest.patch
#
# the generated patch can be applied with
# patch -p0 < newtest.patch

# cvs diff
my $o = `cvs diff`;

# strip '? filename' cvs lines for unknown files
$o =~ s/^\?.*\n//gm;

for (@ARGV) {
    $o .= "\n";
    $o .= `diff -u /dev/null $_`
}

print $o;




_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: patch generation automation

Posted by Doug MacEachern <do...@covalent.net>.
On Sun, 12 Aug 2001, Stas Bekman wrote:

> Here is a script to save you typing to generated patches ready to be
> posted to the list, especially if you create new files. it's very simple
> but saves a lot of time when you need to clean the patch and regenerate
> the patch again and again.
> 
> Should I put it in ./util?

sure.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org