Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Got rid of patch fuzz.
[rsync/rsync-patches.git]
/
verify-patches
diff --git
a/verify-patches
b/verify-patches
index
0a786ea
..
67698cd
100755
(executable)
--- a/
verify-patches
+++ b/
verify-patches
@@
-2,6
+2,7
@@
use strict;
use Getopt::Long;
use strict;
use Getopt::Long;
+use Cwd;
my @generated_files = qw( proto.h configure config.h.in rsync.1 rsyncd.conf.5 );
my @generated_files = qw( proto.h configure config.h.in rsync.1 rsyncd.conf.5 );
@@
-31,6
+32,8
@@
from inside the patches subdir.
EOT
}
EOT
}
+my $patches_dir = Cwd::cwd();
+
$ENV{'LC_COLLATE'} = 'C';
$| = 1;
my $CONF_OPTS = '--cache-file=../config.cache';
$ENV{'LC_COLLATE'} = 'C';
$| = 1;
my $CONF_OPTS = '--cache-file=../config.cache';
@@
-51,7
+54,8
@@
close IN;
mkdir('tmp', 0777) unless -d 'tmp';
chdir('tmp') or die "Unable to chdir to 'tmp'";
mkdir('tmp', 0777) unless -d 'tmp';
chdir('tmp') or die "Unable to chdir to 'tmp'";
-symlink('..', 'patches') unless -d 'patches';
+unlink('patches');
+symlink($patches_dir, 'patches');
symlink($$, 'lock') or die "Unable to create lock file: $!\n";
symlink($$, 'lock') or die "Unable to create lock file: $!\n";
@@
-90,13
+94,13
@@
foreach my $diff (@ARGV) {
my $dep = $1;
$has_dependencies = 1;
print "\nApplying dependency patch $dep...\n";
my $dep = $1;
$has_dependencies = 1;
print "\nApplying dependency patch $dep...\n";
- if (system("patch -d cvsdir -p1 -b -Vt <patches/$dep") != 0) {
+ if (system("patch -
f -
d cvsdir -p1 -b -Vt <patches/$dep") != 0) {
print "Unable to cleanly apply dependency patch -- skipping $diff\n";
system "rm -f cvsdir/*.rej cvsdir/*/*.rej";
&restore_cvsdir;
next DIFF;
}
print "Unable to cleanly apply dependency patch -- skipping $diff\n";
system "rm -f cvsdir/*.rej cvsdir/*/*.rej";
&restore_cvsdir;
next DIFF;
}
- sleep(1)
if $prepare_source
; # Ensure later diffs get later times.
+ sleep(1); # Ensure later diffs get later times.
}
if (!defined($conf_opts) && s#^\s+\./configure\s+##) {
chomp($conf_opts = $_);
}
if (!defined($conf_opts) && s#^\s+\./configure\s+##) {
chomp($conf_opts = $_);
@@
-210,11
+214,11
@@
sub apply_patch
my($diff) = @_;
undef @new;
my($diff) = @_;
undef @new;
- system "rsync -a --del
ete
--exclude='*~' cvsdir/ workdir/";
+ system "rsync -a --del --exclude='*~' cvsdir/ workdir/";
print "\nApplying patch $diff...\n";
undef @rejects;
my($saw_offset, $saw_fuzz);
print "\nApplying patch $diff...\n";
undef @rejects;
my($saw_offset, $saw_fuzz);
- open(IN, "patch -d workdir -p1 --no-backup-if-mismatch <patches/$diff |") or die $!;
+ open(IN, "patch -
f -
d workdir -p1 --no-backup-if-mismatch <patches/$diff |") or die $!;
while (<IN>) {
print $_;
chomp;
while (<IN>) {
print $_;
chomp;
@@
-222,6
+226,8
@@
sub apply_patch
push(@new, $_) unless -f "cvsdir/$_";
} elsif (s/.* saving rejects to file //) {
push(@rejects, $_);
push(@new, $_) unless -f "cvsdir/$_";
} elsif (s/.* saving rejects to file //) {
push(@rejects, $_);
+ } elsif (/No file to patch\.\s+Skipping patch/) {
+ push(@rejects, 'skipped.file');
} elsif (/^Hunk #\d+ succeeded at \d+( with fuzz $interesting_fuzz)?/o) {
$saw_fuzz ||= defined $1;
$saw_offset = 1;
} elsif (/^Hunk #\d+ succeeded at \d+( with fuzz $interesting_fuzz)?/o) {
$saw_fuzz ||= defined $1;
$saw_offset = 1;