Lines Matching defs: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 # Handles binary files (requires patches made by svn-create-patch).
47 # Handles copied and moved files (requires patches made by svn-create-patch).
53 # Handle copied and moved directories (would require patches made by svn-create-patch).
55 # Notice a patch that's being applied at the "wrong level" and make it work anyway.
56 # Do a dry run on the whole patch and don't do anything if part of the patch is
80 sub patch($);
125 print "Parsed " . @diffHashRefs . " diffs from patch file(s).\n";
154 patch($diffHashRef);
191 # $patch: a patch string.
194 # found in the patch's "Index:" line.
195 # $options: a reference to an array of options to pass to the patch command.
198 my ($patch, $pathRelativeToRoot, $options) = @_;
202 my $exitStatus = runPatchCommand($patch, $repositoryRootPath, $pathRelativeToRoot, $optionalArgs);
306 sub patch($)
310 # Make sure $patch is initialized to some value. A deletion can have no
313 my $patch = $diffHashRef->{svnConvertedText} || "";
322 $addition = 1 if ($diffHashRef->{isNew} || $patch =~ /\n@@ -0,0 .* @@/);
323 $deletion = 1 if ($diffHashRef->{isDeletion} || $patch =~ /\n@@ .* \+0,0 @@/);
326 # Standard patch, patch tool can handle this.
329 my $changeLogHash = fixChangeLogPatch($patch);
330 my $newPatch = setChangeLogDateAndReviewer($changeLogHash->{patch}, $reviewer, $epochTime);
334 applyPatch($patch, $fullPath) if $patch;
345 handleBinaryChange($fullPath, $patch) if $patch;
348 applyPatch($patch, $fullPath, ["--force"]) if $patch;
353 applyPatch($patch, $fullPath) if $patch;
458 # removed in a patch, and all of the files inside of the directory are removed