Changeset 46156 in webkit
- Timestamp:
- Jul 20, 2009 11:41:30 PM (15 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r46139 r46156 1 2009-07-20 Mark Rowe <mrowe@apple.com> 2 3 Reviewed by David D. Kilzer. 4 5 Fix <https://bugs.webkit.org/show_bug.cgi?id=27482>. 6 Bug 27482: svn-apply cannot apply patch generated by Windows SVN 7 8 A regexp in svn-apply was treating everything prior to a \n as part of the 9 file name. The native Windows SVN client uses \r\n for line endings which 10 meant that the \r was being included in the file name. This defeated the 11 special-case logic for ChangeLogs to apply them with an increased fuzz factor, 12 meaning that the ChangeLog portions of such patches would fail to apply. 13 14 Also updated two other regexps that look like they would hit similar problems 15 with line-endings so that they will correctly handle patches from Windows SVN. 16 17 * Scripts/svn-apply: 18 1 19 2009-07-20 Peter Kasting <pkasting@google.com> 2 20 -
trunk/WebKitTools/Scripts/svn-apply
r45751 r46156 255 255 my $contextLineCount = 3; 256 256 257 return $patch if $patch !~ /\n@@ -1,(\d+) \+1,(\d+) @@\ n( .*\n)+(\+.*\n)+( .*\n){$contextLineCount}$/m;257 return $patch if $patch !~ /\n@@ -1,(\d+) \+1,(\d+) @@\r?\n( .*\r?\n)+(\+.*\r?\n)+( .*\r?\n){$contextLineCount}$/m; 258 258 my ($oldLineCount, $newLineCount) = ($1, $2); 259 259 return $patch if $oldLineCount <= $contextLineCount; … … 359 359 return if !$patch; 360 360 361 unless ($patch =~ m|^Index: ([^\ n]+)|) {361 unless ($patch =~ m|^Index: ([^\r\n]+)|) { 362 362 my $separator = '-' x 67; 363 363 warn "Failed to find 'Index:' in:\n$separator\n$patch\n$separator\n"; … … 370 370 my $isBinary = 0; 371 371 372 $addition = 1 if ($patch =~ /\n--- .+\(revision 0\)\ n/ || $patch =~ /\n@@ -0,0 .* @@/);372 $addition = 1 if ($patch =~ /\n--- .+\(revision 0\)\r?\n/ || $patch =~ /\n@@ -0,0 .* @@/); 373 373 $deletion = 1 if $patch =~ /\n@@ .* \+0,0 @@/; 374 374 $isBinary = 1 if $patch =~ /\nCannot display: file marked as a binary type\./;
Note: See TracChangeset
for help on using the changeset viewer.