Home | History | Annotate | Download | only in Scripts

Lines Matching refs:patch

31 # "patch" script for WebKit Open Source Project, used to apply patches.
33 # Differences from invoking "patch -p0":
40 # Has mode where it will roll back to svn version numbers in the patch file so svn
42 # Paths from Index: lines are used rather than the paths on the patch lines, which
46 # the patch to today's date using $changeLogTimeZone.
47 # Handles binary files (requires patches made by svn-create-patch).
48 # Handles copied and moved files (requires patches made by svn-create-patch).
54 # Handle copied and moved directories (would require patches made by svn-create-patch).
56 # Notice a patch that's being applied at the "wrong level" and make it work anyway.
57 # Do a dry run on the whole patch and don't do anything if part of the patch is
81 sub patch($);
132 my $patch;
142 if ($patch) {
144 push @patches, $patch;
147 $patch = "";
166 $patch .= $_;
167 $patch .= $eol;
170 if ($patch && !$copiedFromPath) {
171 push @patches, $patch;
190 for $patch (@patches) {
191 patch($patch);
228 # $patch: a patch string.
231 # found in the patch's "Index:" line.
232 # $options: a reference to an array of options to pass to the patch command.
235 my ($patch, $pathRelativeToRoot, $options) = @_;
239 my $exitStatus = runPatchCommand($patch, $repositoryRootPath, $pathRelativeToRoot, $optionalArgs);
328 sub patch($)
330 my ($patch) = @_;
331 return if !$patch;
333 unless ($patch =~ m|^Index: ([^\r\n]+)|) {
335 warn "Failed to find 'Index:' in:\n$separator\n$patch\n$separator\n";
346 $addition = 1 if ($patch =~ /\n--- .+\(revision 0\)\r?\n/ || $patch =~ /\n@@ -0,0 .* @@/) && !exists($copiedFiles{$fullPath});
347 $deletion = 1 if $patch =~ /\n@@ .* \+0,0 @@/;
348 $isBinary = 1 if $patch =~ /\nCannot display: file marked as a binary type\./;
349 $isGitBinary = 1 if $patch =~ /\nGIT binary patch\n/;
352 # Standard patch, patch tool can handle this.
355 applyPatch(setChangeLogDateAndReviewer(fixChangeLogPatch($patch), $reviewer), $fullPath, ["--fuzz=3"]);
358 applyPatch($patch, $fullPath);
367 handleBinaryChange($fullPath, $patch);
370 handleGitBinaryChange($fullPath, $patch);
373 applyPatch($patch, $fullPath, ["--force"]);
378 applyPatch($patch, $fullPath);
398 my $patch = shift;
409 $patch =~ s/(\n\+)\d{4}-[^-]{2}-[^-]{2}( )/$1$newDate$2/;
411 $patch =~ s/NOBODY \(OOPS!\)/$reviewer/;
413 return $patch;