Lines Matching full:patch
347 # Some users have a workflow where svn-create-patch, svn-apply and
626 } elsif (/^GIT binary patch$/ ) {
720 # The "from" clause is created by svn-create-patch, in
816 # that, if necessary, the text of an SVN or Git patch can be
844 # Parse one diff from a patch file created by svn-create-patch, and
887 # Then assume all diffs in the patch are Git-formatted. This
889 # all diffs in the patch are formatted the same (SVN or Git).
909 # modified or patch(1) will complain. So, we only modify non-chunk range lines.
1057 # of a patch, or the start of the next diff (e.g. "Index:").
1116 # line that precedes the contents of a binary patch.
1197 # Note, we may encounter an empty line before the contents of a binary patch.
1216 # Parse a patch file created by svn-create-patch.
1219 # $fileHandle: A file handle to the patch file that has not yet been
1341 # Set the reviewer and date in a ChangeLog patch, and return the new patch.
1344 # $patch: a ChangeLog patch as a string.
1349 my ($patch, $reviewer, $epochTime) = @_;
1355 $patch =~ s/$firstChangeLogLineRegEx/$1$newDate$2/;
1360 # for the patch, if the patch has leading junk.
1361 $patch =~ s/(\n\+.*)NOBODY \(OOPS!\)/$1$reviewer/;
1364 return $patch;
1367 # If possible, returns a ChangeLog patch equivalent to the given one,
1371 # If given a patch string not representable as a patch with the above
1374 # WARNING: This subroutine can return an inequivalent patch string if
1377 # Otherwise, it is guaranteed to return an equivalent patch string,
1382 # svn-apply uses patch with --fuzz=3 to do this. We need to apply
1391 # $changeLogHashRef: a hash reference representing a change log patch.
1392 # patch: a ChangeLog patch equivalent to the given one, but with the
1396 my $patch = shift; # $patch will only contain patch fragments for ChangeLog.
1398 $patch =~ /(\r?\n)/;
1400 my @lines = split(/$lineEnding/, $patch);
1415 $changeLogHashRef{patch} = $patch;
1433 $changeLogHashRef{patch} = $patch; # Do not change if, for example, "-" or "@" found.
1437 $changeLogHashRef{patch} = $patch; # Do not change if date not found.
1472 # while checking that patch stays equivalent.
1481 $changeLogHashRef{patch} = $patch; # Unexpected difference.
1504 $changeLogHashRef{patch} = $patch; # Error: unexpected patch string format.
1514 $changeLogHashRef{patch} = join($lineEnding, @lines) . "\n"; # patch(1) expects an extra trailing newline.
1562 my $patchCommand = join(" ", "patch -p0", @{$options});
1567 # Apply the given patch using the patch(1) command.
1574 # $patch: a patch string.
1578 # found in the patch's "Index:" line. It is passed
1579 # explicitly rather than reparsed from the patch
1582 # patch command gleans the actual file to patch
1583 # from the patch string.
1589 # patch command. The subroutine passes the -p0 option
1595 my ($patch, $repositoryRootPath, $pathRelativeToRoot, $args) = @_;
1600 # in the patch's "Index:" line is relative to the repository root
1605 open PATCH, "| $patchCommand" or die "Could not call \"$patchCommand\" for file \"$pathRelativeToRoot\": $!";
1606 print PATCH $patch;
1607 close PATCH;
1614 "status $exitStatus. Pass --force to ignore patch failures.\n";
1624 # and when it's used to merge conflicts after a patch is applied or after
1632 # For traditional patch rejects, this is the *.rej file.
1635 # For traditional patch rejects, this is the *.orig file.
1638 # For traditional patch rejects, this is the original-named
1650 my $patch;
1653 $patch = <DIFF>;
1659 $patch = <DIFF>;
1666 open(PATCH, "| patch --force --fuzz=3 --binary $fileNewer > " . File::Spec->devnull()) or die $!;
1668 print PATCH $patch;
1670 my $changeLogHash = fixChangeLogPatch($patch);
1671 print PATCH $changeLogHash->{patch};
1673 close(PATCH);
1677 # Refuse to merge the patch if it did not apply cleanly
1815 # Git binary patch has two chunks. One is for the normal patching
1824 if ($contents !~ m"\nGIT binary patch\n$gitPatchRegExp$gitPatchRegExp\Z") {
1825 die "$fullPath: unknown git binary patch format"
1857 # - https://github.com/git/git/blob/master/patch-delta.c:patch_delta is the source
1864 # start of the binary delta patch data. The highest bit in each byte