diff --git a/vfs/ChangeLog b/vfs/ChangeLog index c58828774..7ebcc98c8 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,8 @@ +2002-12-19 Adam Byrtek + + * extfs/patchfs.in: Allow diffs with function names after "@@". + Don't consider an empty newline as the end of the diff. + 2002-12-18 Andrew V. Samoilov * extfs/patchfs.in (openread): Use quoted $archive when opening diff --git a/vfs/extfs/patchfs.in b/vfs/extfs/patchfs.in index c4de85e89..efcbd4476 100644 --- a/vfs/extfs/patchfs.in +++ b/vfs/extfs/patchfs.in @@ -39,7 +39,7 @@ sub datetime # print message on stderr and exit sub error { - print STDERR $_[0]; + print STDERR $_[0], "\n"; exit 1; } @@ -69,7 +69,7 @@ sub list $state=1; error "Can't parse unified diff header" - unless ((($_.=).=)=~/^\-{3} .*\n\+{3} .*\n@@ .* @@\n$/); + unless ((($_.=).=)=~/^\-{3} .*\n\+{3} .*\n@@ .* @@.*\n$/); ($fsrc)=/^-{3} ([^\s]+).*\n.*\n.*\n$/; ($fdst)=/^.*\n\+{3} ([^\s]+).*\n.*\n$/; ($time)=/^.*\n\+{3} [^\s]+\s+([^\t\n]+).*\n.*\n$/; @@ -108,7 +108,7 @@ sub list } $f=$f.".diff"; - } elsif ($state==1 && !/^([+\- ]|@@)/) { + } elsif ($state==1 && !/^([+\- \n]|@@)/) { # start of comments, end of diff contents $npos=tell(I)-length; printf "-rw-r--r-- 1 %s %s %d %s %s%s\n", $uid, $gid, $npos-$pos, datetime($time), $prefix, $f @@ -138,12 +138,12 @@ sub copyout $state=1; error "Can't parse unified diff header" - unless ((($_.=).=)=~/^\-{3} .*\n\+{3} .*\n@@ .* @@\n$/); + unless ((($_.=).=)=~/^\-{3} .*\n\+{3} .*\n@@ .* @@.*\n$/); ($fsrc)=/^-{3} ([^\s]+).*\n.*\n.*\n$/; ($fdst)=/^.*\n\+{3} ([^\s]+).*\n.*\n$/; $found=1 if (($fsrc eq $file) || ($fdst eq $file)); - } elsif ($state==1 && !/^([+\- ]|@@)/) { + } elsif ($state==1 && !/^([+\- \n]|@@)/) { # start of comments, end of diff contents last if ($found); $state=0;