wrapper already in the directory.
* Scripts/svn-apply: Handle additions and deletions properly -- I've been noticing
these haven't been working at all.
* Scripts/svn-unapply: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12557
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-02-04 Darin Adler <darin@apple.com>
+
+ * Scripts/make-js-test-wrappers: Don't create a wrapper if there's a disabled
+ wrapper already in the directory.
+ * Scripts/svn-apply: Handle additions and deletions properly -- I've been noticing
+ these haven't been working at all.
+ * Scripts/svn-unapply: Ditto.
+
2006-02-03 Timothy Hatcher <timothy@apple.com>
Reviewed by Justin.
for my $file (@files) {
chomp $file;
- if ($file =~ /js-test-.*\.js/) {
- next;
- }
+ next if $file =~ /js-test-.*\.js/;
+
+ my $html = $file;
+ $html =~ s:resources/(.*)\.js:$1.html:;
+ next if -f "$html-disabled";
system("grep -q 'successfullyParsed =' $file");
if ($? != 0) {
`echo "var successfullyParsed = true;" >> "${file}"`;
}
- my $html = $file;
- $html =~ s:resources/(.*)\.js:$1.html:;
print " ${html}\n";
open HTML, ">$html";
my $output = ($file =~ /-n\.js/) ? $templateNegative : $template;
$patch =~ m|^Index: ((([^/\n]*/)*)([^/\n]+))| or die "Failed to find Index: in \"$patch\"\n";
my ($fullpath, $prefix, $base) = ($1, $2, $4);
- my $previousRevision = 0;
- if($patch =~ /\n--- .+\(revision (\d+)\)\n/) {
- $previousRevision = $1;
- }
+ my $deletion = 0;
+ my $addition = 0;
+
+ $addition = 1 if $patch =~ /\n--- .+\(revision 0\)\n/;
+ $deletion = 1 if $patch =~ /\n@@ .* \+0,0 @@/;
- if ($previousRevision != 0 || $patch !~ /\ndiff -N/) {
+ if (!$addition && !$deletion) {
# Standard patch, patch tool can handle this.
open PATCH, "| patch -p0" or die "Failed to patch $fullpath\n";
print PATCH $patch;
# Change directory down into the directory in question.
chdirAddingDirectoriesIfNeeded($prefix);
- if ($patch =~ /\n@@ .* \+0,0 @@/) {
+ if ($deletion) {
# Deletion.
system "svn", "rm", $base;
} else {
#!/usr/bin/perl -w
-# Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+# Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
my ($patch) = @_;
return if !$patch;
- my $previousRevision = 0;
- if($patch =~ /\n--- .+\(revision (\d+)\)\n/) {
- $previousRevision = $1;
- }
+ my $deletion = 0;
+ my $addition = 0;
+
+ $addition = 1 if $patch =~ /\n--- .+\(revision 0\)\n/;
+ $deletion = 1 if $patch =~ /\n@@ .* \+0,0 @@/;
- if ($previousRevision != 0 || $patch !~ /\ndiff -N/) {
+ if (!$addition && !$deletion) {
# Standard patch, patch tool can handle this.
open PATCH, "| patch -p0 -R" or die;
print PATCH $patch;
chdir $prefix or die "Failed to chdir to $prefix";
}
- if ($patch =~ /\n@@ .* \+0,0 @@/) {
+ if ($deletion) {
# Reverse a deletion.
system "svn", "add", "$base";
my $file = $patch;