Changeset 46095 in webkit
- Timestamp:
- Jul 18, 2009 11:50:02 AM (15 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r46093 r46095 1 2009-07-17 Peter Kasting <pkasting@google.com> 2 3 Reviewed by David Kilzer. 4 5 https://bugs.webkit.org/show_bug.cgi?id=27323 6 Further improve non-Cygwin SVN support. 7 8 * Scripts/prepare-ChangeLog: Harmless change to be consistent with other 9 places that consume whitespace at the end of svn output. 10 * Scripts/resolve-ChangeLogs: Add support for SVN 1.6. Slightly 11 optimize svn info parsing based on technique in svn-create-patch. 12 Normalize paths and consume whitespace in the same way as 13 prepare-ChangeLog, for Windows systems with a non-Cygwin SVN. Force 14 diff and patch to run in binary mode so that they won't 15 "intelligently" screw up line endings. 16 1 17 2009-07-18 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/WebKitTools/Scripts/prepare-ChangeLog
r46064 r46095 1281 1281 sub diffHeaderFormat() 1282 1282 { 1283 return qr/^Index: (\S+)\ r?\n?$/ if $isSVN;1283 return qr/^Index: (\S+)\s*$/ if $isSVN; 1284 1284 return qr/^diff --git a\/.+ b\/(.+)$/ if $isGit; 1285 1285 } … … 1291 1291 open INFO, "$SVN info . |" or die; 1292 1292 while (<INFO>) { 1293 if (/^URL: (.*\S+)\ r?\n?$/) {1293 if (/^URL: (.*\S+)\s*$/) { 1294 1294 $baseUrl = $1; 1295 1295 } … … 1299 1299 open INFO, "$SVN info '$file' |" or die; 1300 1300 while (<INFO>) { 1301 if (/^Copied From URL: (.*\S+)\ r?\n?$/) {1301 if (/^Copied From URL: (.*\S+)\s*$/) { 1302 1302 $sourceFile = File::Spec->abs2rel($1, $baseUrl); 1303 1303 } … … 1320 1320 my $matches; 1321 1321 if (eval "v$svnVersion" ge v1.6) { 1322 $matches = /^([ACDMR]).{6} (.*\S+)\ r?\n?$/;1322 $matches = /^([ACDMR]).{6} (.*\S+)\s*$/; 1323 1323 $status = $1; 1324 1324 $file = $2; 1325 1325 } else { 1326 $matches = /^([ACDMR]).{5} (.*\S+)\ r?\n?$/;1326 $matches = /^([ACDMR]).{5} (.*\S+)\s*$/; 1327 1327 $status = $1; 1328 1328 $file = $2; -
trunk/WebKitTools/Scripts/resolve-ChangeLogs
r44092 r46095 55 55 sub showStatus($;$); 56 56 sub usageAndExit(); 57 sub normalizePath($); 57 58 58 59 my $isGit = isGit(); … … 61 62 my $SVN = "svn"; 62 63 my $GIT = "git"; 64 65 my $svnVersion = `svn --version --quiet` if $isSVN; 63 66 64 67 my $fixMerged; … … 165 168 open INFO, "-|", $SVN, "info", $file || die; 166 169 while (my $line = <INFO>) { 167 $currentRevision = $1 if $line =~ m/^Revision: ([0-9]+)/; 170 if ($line =~ m/^Revision: ([0-9]+)/) { 171 $currentRevision = $1; 172 { local $/ = undef; <INFO>; } # Consume rest of input. 173 } 168 174 } 169 175 close INFO; … … 237 243 while (<STAT>) { 238 244 if ($isSVN) { 239 if (/^([C]).{5} (.+)$/) { 240 my $file = findChangeLog($2); 245 my $matches; 246 my $file; 247 if (eval "v$svnVersion" ge v1.6) { 248 $matches = /^([C]).{6} (.*\S+)\s*$/; 249 $file = $2; 250 } else { 251 $matches = /^([C]).{5} (.*\S+)\s*$/; 252 $file = $2; 253 } 254 if ($matches) { 255 $file = findChangeLog(normalizePath($file)); 241 256 push @results, $file if $file; 242 257 } else { … … 245 260 } elsif ($isGit) { 246 261 if (/^([U])\t(.+)$/) { 247 my $file = findChangeLog( $2);262 my $file = findChangeLog(normalizePath($2)); 248 263 push @results, $file if $file; 249 264 } else { … … 420 435 rename($fileOlder, "$fileOlder.save"); 421 436 } else { 422 open(DIFF, "-|", qw(diff -u ), $fileOlder, $fileMine) || die;437 open(DIFF, "-|", qw(diff -u -a --binary), $fileOlder, $fileMine) || die; 423 438 $patch = <DIFF>; 424 439 close(DIFF); … … 428 443 unlink("${fileNewer}.rej"); 429 444 430 open(PATCH, "| patch --fuzz=3 $fileNewer > /dev/null") || die;445 open(PATCH, "| patch --fuzz=3 --binary $fileNewer > /dev/null") || die; 431 446 print PATCH fixChangeLogPatch($patch); 432 447 close(PATCH); … … 535 550 } 536 551 } 552 553 sub normalizePath($) 554 { 555 my ($path) = @_; 556 $path =~ s/\\/\//g; 557 return $path; 558 }
Note: See TracChangeset
for help on using the changeset viewer.