Home | History | Annotate | Download | only in Scripts

Lines Matching defs:patch

33 # Differences from invoking "patch -p0 -R":
39 # Paths from Index: lines are used rather than the paths on the patch lines, which
43 # the patch before it is applied (svn-apply sets it when applying a patch).
44 # Handles binary files (requires patches made by svn-create-patch).
45 # Handles copied and moved files (requires patches made by svn-create-patch).
51 # Handle copied and moved directories (would require patches made by svn-create-patch).
52 # Use version numbers in the patch file and do a 3-way merge.
54 # Notice a patch that's being unapplied at the "wrong level" and make it work anyway.
55 # Do a dry run on the whole patch and don't do anything if part of the patch is
75 sub patch($);
104 print "Parsed " . @diffHashRefs . " diffs from patch file(s).\n";
112 patch($diffHashRef);
117 patch($diffHashRef);
138 sub patch($)
142 # Make sure $patch is initialized to some value. There is no
144 my $patch = $diffHashRef->{svnConvertedText} || "";
148 my $hasTextChunks = $patch && $diffHashRef->{numTextChunks};
155 $addition = 1 if ($diffHashRef->{isNew} || $diffHashRef->{copiedFromPath} || $patch =~ /\n@@ -0,0 .* @@/);
156 $deletion = 1 if ($diffHashRef->{isDeletion} || $patch =~ /\n@@ .* \+0,0 @@/);
159 # Standard patch, patch tool can handle this.
162 my $changeLogHash = fixChangeLogPatch($patch);
163 unapplyPatch(unsetChangeLogDate($fullPath, $changeLogHash->{patch}), $fullPath, ["--fuzz=3"]);
166 unapplyPatch($patch, $fullPath);
181 unapplyPatch($patch, $fullPath);
188 # Keep the version from the patch in case it's different from svn.
209 unapplyPatch($patch, $fullPath, ["--force"]) if $patch;
252 # $patch: a patch string.
255 # found in the patch's "Index:" line.
256 # $options: a reference to an array of options to pass to the patch command.
260 my ($patch, $pathRelativeToRoot, $options) = @_;
264 my $exitStatus = runPatchCommand($patch, $repositoryRootPath, $pathRelativeToRoot, $optionalArgs);
274 my $patch = shift;
281 $patch =~ s/(\n\+)\d{4}-[^-]{2}-[^-]{2}( )/$1$newDate$2/;
282 return $patch;