Bug 33134
Summary: | Create a unit tested parsePatchHeader() subroutine for svn-apply and svn-unapply | ||
---|---|---|---|
Product: | WebKit | Reporter: | Chris Jerdonek <cjerdonek> |
Component: | Tools / Tests | Assignee: | Chris Jerdonek <cjerdonek> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | abarth, aroben, cjerdonek, darin, ddkilzer, eric, hamaji |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Chris Jerdonek
Create a unit tested parsePatchHeader() subroutine for svn-apply and svn-unapply. In addition to providing more test coverage, this will result in more code sharing between svn-apply and svn-unapply.
This affects the code in the main while(<>) loop of both scripts:
while (<>) {
s/([\n\r]+)$//mg;
my $eol = $1;
if (!defined($indexPath) && m#^diff --git a/#) {
$filter = \&gitdiff2svndiff;
}
$_ = &$filter($_) if $filter;
if (/^Index: (.+)/) {
...
}
if ($indexPath) {
# Fix paths on diff, ---, and +++ lines to match preceding Index: line.
s/^--- \S+/--- $indexPath/;
if (/^--- .+\(from (\S+):\d+\)$/) {
$copiedFromPath = $1;
}
if (s/^\+\+\+ \S+/+++ $indexPath/) {
$indexPath = "";
}
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Chris Jerdonek
*** This bug has been marked as a duplicate of bug 33447 ***