Home | History | Annotate | Download | only in Scripts

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";
155 patch($diffHashRef);
196 # $patch: a patch string.
199 # found in the patch's "Index:" line.
200 # $options: a reference to an array of options to pass to the patch command.
203 my ($patch, $pathRelativeToRoot, $options) = @_;
207 my $exitStatus = runPatchCommand($patch, $repositoryRootPath, $pathRelativeToRoot, $optionalArgs);
311 sub patch($)
315 # Make sure $patch is initialized to some value. A deletion can have no
318 my $patch = $diffHashRef->{svnConvertedText} || "";
323 my $hasTextChunks = $patch && $diffHashRef->{numTextChunks};
328 $addition = 1 if ($diffHashRef->{isNew} || $patch =~ /\n@@ -0,0 .* @@/);
329 $deletion = 1 if ($diffHashRef->{isDeletion} || $patch =~ /\n@@ .* \+0,0 @@/);
332 # Standard patch, patch tool can handle this.
335 my $changeLogHash = fixChangeLogPatch($patch);
336 my $newPatch = setChangeLogDateAndReviewer($changeLogHash->{patch}, $reviewer, $epochTime);
340 applyPatch($patch, $fullPath);
351 handleBinaryChange($fullPath, $patch) if $patch;
354 applyPatch($patch, $fullPath, ["--force"]) if $patch;
359 applyPatch($patch, $fullPath) if $patch;
469 # removed in a patch, and all of the files inside of the directory are removed