Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made read_arg_from_pipe() handle EINTR.
[rsync/rsync.git]
/
support
/
patch-update
diff --git
a/support/patch-update
b/support/patch-update
index
c428982
..
14360c1
100755
(executable)
--- a/
support/patch-update
+++ b/
support/patch-update
@@
-10,18
+10,26
@@
use strict;
die "No 'patches' directory present in the current dir.\n" unless -d 'patches';
die "No '.git' directory present in the current dir.\n" unless -d '.git';
die "No 'patches' directory present in the current dir.\n" unless -d 'patches';
die "No '.git' directory present in the current dir.\n" unless -d '.git';
-open(IN, '<', 'prepare-source.mak') or die "Couldn't open prepare-source.mak: $!\n";
-$_ = join('', <IN>);
+my @extra_files;
+open(IN, '<', 'Makefile.in') or die "Couldn't open Makefile.in: $!\n";
+while (<IN>) {
+ if (s/^GENFILES=//) {
+ while (s/\\$//) {
+ $_ .= <IN>;
+ }
+ @extra_files = split(' ', $_);
+ last;
+ }
+}
close IN;
close IN;
-my @extra_files = m{\n([^\s:]+):.*\n\t\S}g;
my $incl_generated_files = shift if @ARGV && $ARGV[0] eq '--gen';
my $incl_generated_files = shift if @ARGV && $ARGV[0] eq '--gen';
-system "git
-
checkout master" and exit 1;
+system "git
checkout master" and exit 1;
if ($incl_generated_files) {
die "'a' must not exist in the current directory.\n" if -e 'a';
die "'b' must not exist in the current directory.\n" if -e 'b';
if ($incl_generated_files) {
die "'a' must not exist in the current directory.\n" if -e 'a';
die "'b' must not exist in the current directory.\n" if -e 'b';
- system "
./prepare-source
&& rsync -a @extra_files a/" and exit 1;
+ system "
make gen
&& rsync -a @extra_files a/" and exit 1;
}
my $last_touch = time;
}
my $last_touch = time;
@@
-32,9
+40,9
@@
if (@ARGV) {
s{\.diff$} {};
push(@patches, $_);
}
s{\.diff$} {};
push(@patches, $_);
}
- open(PIPE, '-|', 'git
-
branch', '-l') or die $!;
+ open(PIPE, '-|', 'git
', '
branch', '-l') or die $!;
} else {
} else {
- open(PIPE, '-|', 'git
-
branch', '-a') or die $!;
+ open(PIPE, '-|', 'git
', '
branch', '-a') or die $!;
}
while (<PIPE>) {
if (m# origin/patch/(.*)#) {
}
while (<PIPE>) {
if (m# origin/patch/(.*)#) {
@@
-48,14
+56,13
@@
close PIPE;
my(%parent, %description);
foreach my $patch (@patches) {
my $branch = ($local_patch{$patch} ? '' : 'origin/') . "patch/$patch";
my(%parent, %description);
foreach my $patch (@patches) {
my $branch = ($local_patch{$patch} ? '' : 'origin/') . "patch/$patch";
- open(PIPE, '-|', 'git-diff', "master...$branch", '--', "PATCH.$patch") or die $!;
+ my $desc = '';
+ open(PIPE, '-|', 'git', 'diff', '-U1000', "master...$branch", '--', "PATCH.$patch") or die $!;
while (<PIPE>) {
last if /^@@ /;
}
while (<PIPE>) {
last if /^@@ /;
}
- my $desc = '';
while (<PIPE>) {
while (<PIPE>) {
- next if /^-/; # huh??
- s/^.//;
+ next unless s/^[ +]//;
if (m#patch -p1 <patches/(\S+)\.diff# && $1 ne $patch) {
$parent{$patch} = $1;
}
if (m#patch -p1 <patches/(\S+)\.diff# && $1 ne $patch) {
$parent{$patch} = $1;
}
@@
-74,9
+81,8
@@
if ($incl_generated_files) {
system "rm -rf a b";
}
system "rm -rf a b";
}
-print "-------- master --------\n";
sleep 1 if $last_touch == time;
sleep 1 if $last_touch == time;
-system "git
-checkout master && ./prepare-source
";
+system "git
checkout master
";
exit;
exit;
@@
-99,26
+105,26
@@
sub update_patch
sleep 1 if $incl_generated_files && $last_touch == time;
if ($local_patch{$patch}) {
sleep 1 if $incl_generated_files && $last_touch == time;
if ($local_patch{$patch}) {
- system "git
-
checkout patch/$patch" and exit 1;
+ system "git
checkout patch/$patch" and exit 1;
} else {
} else {
- system "git
-
checkout --track -b patch/$patch origin/patch/$patch" and exit 1;
+ system "git
checkout --track -b patch/$patch origin/patch/$patch" and exit 1;
}
open(OUT, '>', "patches/$patch.diff") or die $!;
print OUT $description{$patch}, "\n";
}
open(OUT, '>', "patches/$patch.diff") or die $!;
print OUT $description{$patch}, "\n";
- if (system("git
-
rebase -m $parent") != 0) {
- print qq|"git
-
rebase -m $parent" incomplete -- please fix.\n|;
+ if (system("git
rebase -m $parent") != 0) {
+ print qq|"git
rebase -m $parent" incomplete -- please fix.\n|;
$ENV{PS1} = "[$parent] patch/$patch: ";
system $ENV{SHELL} and exit 1;
}
if ($incl_generated_files) {
$ENV{PS1} = "[$parent] patch/$patch: ";
system $ENV{SHELL} and exit 1;
}
if ($incl_generated_files) {
- system "
./prepare-source
&& rsync -a @extra_files b/" and exit 1;
+ system "
make gen
&& rsync -a @extra_files b/" and exit 1;
}
$last_touch = time;
}
$last_touch = time;
- open(PIPE, '-|', 'git
-
diff', $parent) or die $!;
+ open(PIPE, '-|', 'git
', '
diff', $parent) or die $!;
DIFF: while (<PIPE>) {
while (m{^diff --git a/PATCH}) {
while (<PIPE>) {
DIFF: while (<PIPE>) {
while (m{^diff --git a/PATCH}) {
while (<PIPE>) {
@@
-126,6
+132,7
@@
sub update_patch
}
last DIFF if !defined $_;
}
}
last DIFF if !defined $_;
}
+ next if /^index /;
print OUT $_;
}
close PIPE;
print OUT $_;
}
close PIPE;