#!/usr/bin/perl
use strict;
+use Getopt::Long;
+
+my($no_cvs, $minor_updates);
+
+&Getopt::Long::Configure('bundling');
+GetOptions(
+ 'no-cvs|n' => \$no_cvs,
+ 'minor-updates|u' => \$minor_updates,
+) or &usage;
chdir('patches') if -d 'patches';
EOT
close OUT;
-print "Using CVS to update the tmp/cvsdir copy of the source.\n";
-system qq|cvs -d "$root" co -d cvsdir rsync|;
+unless ($no_cvs) {
+ print "Using CVS to update the tmp/cvsdir copy of the source.\n";
+ system qq|cvs -d "$root" co -d cvsdir rsync|;
+}
@ARGV = glob('../*.diff') unless @ARGV;
if ($default =~ s/^D,// || $default eq 'N') {
my $def = generate_new_patch($diff);
$default = 'U,N' if $default eq 'N' && $def eq 'E';
+ $default = 'N' if !$minor_updates && $default eq 'U,N';
}
PROMPT:
}
}
}
+
+sub usage
+{
+ die <<EOT;
+Usage: $0 [OPTS] [DIFF-FILE...]
+ -n, --no-cvs Don't update tmp/cvsdir at the start of the run
+ -u, --minor-updates Suggest 'U' for even minor changes in the diff
+EOT
+}