From fcbecd85af07376d8c4e09c0f80e31a46c47a51d Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 15 Jul 2004 16:51:35 +0000 Subject: [PATCH] Reset @rejects for each new patch application. --- verify-patches | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/verify-patches b/verify-patches index 506f4c6..9139304 100755 --- a/verify-patches +++ b/verify-patches @@ -71,7 +71,7 @@ foreach my $diff (@ARGV) { close IN; my $default = apply_patch($diff); - if ($default =~ /[NE]/) { + if ($default =~ s/^D,// || $default eq 'N') { generate_new_patch($diff); } @@ -166,6 +166,7 @@ sub apply_patch my $def = 'N'; system "rsync -a --delete --exclude='*~' cvsdir/ workdir/"; print "\nApplying patch $diff...\n"; + undef @rejects; open(IN, "patch -d workdir -p0 --no-backup-if-mismatch -Zf <../$diff |") or die $!; while () { print $_; @@ -177,7 +178,7 @@ sub apply_patch } elsif (/^Hunk #\d+ FAILED/) { $def = 'F,D,E'; } elsif (/^Hunk #\d+ succeeded/) { - $def = 'E' unless $def =~ /F/; + $def = 'D,E' unless $def =~ /F/; } } close IN; -- 2.34.1