From: Wayne Davison Date: Thu, 15 Jul 2004 16:51:35 +0000 (+0000) Subject: Reset @rejects for each new patch application. X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/commitdiff_plain/fcbecd85af07376d8c4e09c0f80e31a46c47a51d Reset @rejects for each new patch application. --- 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;