Commit f189b702 authored by pkasting@chromium.org's avatar pkasting@chromium.org

WebKitLibraries: https://bugs.webkit.org/show_bug.cgi?id=27323

Change pattern that strips all trailing whitespace to just remove EOL
chars (\r, \n), to make it clear that varying EOL chars is the primary
problem being solved.

Reviewed by Darin Adler.

* win/tools/scripts/auto-version.sh:

WebKitTools: https://bugs.webkit.org/show_bug.cgi?id=27323
Change pattern that strips all trailing whitespace to just remove EOL
chars (\r, \n), to make it clear that varying EOL chars is the primary
problem being solved.

Reviewed by Darin Adler.

* Scripts/prepare-ChangeLog:
* Scripts/resolve-ChangeLogs:
* Scripts/svn-create-patch:
* Scripts/update-webkit:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7da12e6a
2009-08-12 Peter Kasting <pkasting@google.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=27323
Change pattern that strips all trailing whitespace to just remove EOL
chars (\r, \n), to make it clear that varying EOL chars is the primary
problem being solved.
* win/tools/scripts/auto-version.sh:
2009-08-10 Peter Kasting <pkasting@google.com> 2009-08-10 Peter Kasting <pkasting@google.com>
Reviewed by George Staikos. Reviewed by George Staikos.
......
...@@ -29,7 +29,7 @@ VERSIONPATH=$VERSIONPATH/include ...@@ -29,7 +29,7 @@ VERSIONPATH=$VERSIONPATH/include
VERSIONFILE=$VERSIONPATH/autoversion.h VERSIONFILE=$VERSIONPATH/autoversion.h
mkdir -p "$VERSIONPATH" mkdir -p "$VERSIONPATH"
PRODUCTVERSION=`cat $SRCPATH/PRODUCTVERSION | sed -r 's/(.*\S+)\s*$/\1/'` PRODUCTVERSION=`cat $SRCPATH/PRODUCTVERSION | sed -r 's/(.+?)[\r\n]*$/\1/'`
MAJORVERSION=`echo "$PRODUCTVERSION" | sed 's/\([^\.]*\)\.\([^.]*\)\(\.\([^.]*\)\)\?/\1/'` MAJORVERSION=`echo "$PRODUCTVERSION" | sed 's/\([^\.]*\)\.\([^.]*\)\(\.\([^.]*\)\)\?/\1/'`
MINORVERSION=`echo "$PRODUCTVERSION" | sed 's/\([^\.]*\)\.\([^.]*\)\(\.\([^.]*\)\)\?/\2/'` MINORVERSION=`echo "$PRODUCTVERSION" | sed 's/\([^\.]*\)\.\([^.]*\)\(\.\([^.]*\)\)\?/\2/'`
TINYVERSION=`echo "$PRODUCTVERSION" | sed 's/\([^\.]*\)\.\([^.]*\)\(\.\([^.]*\)\)\?/\4/'` TINYVERSION=`echo "$PRODUCTVERSION" | sed 's/\([^\.]*\)\.\([^.]*\)\(\.\([^.]*\)\)\?/\4/'`
...@@ -42,7 +42,7 @@ if [ "$RC_PROJECTSOURCEVERSION" == "" ]; then ...@@ -42,7 +42,7 @@ if [ "$RC_PROJECTSOURCEVERSION" == "" ]; then
else else
PROPOSEDVERSION="$RC_PROJECTSOURCEVERSION" PROPOSEDVERSION="$RC_PROJECTSOURCEVERSION"
fi fi
PROPOSEDVERSION=`echo "$PROPOSEDVERSION" | sed -r 's/(.*\S+)\s*$/\1/'` PROPOSEDVERSION=`echo "$PROPOSEDVERSION" | sed -r 's/(.+?)[\r\n]*$/\1/'`
BLDMAJORVERSION=`echo "$PROPOSEDVERSION" | sed 's/\([^\.]*\)\(\.\([^.]*\)\(\.\([^.]*\)\)\?\)\?/\1/'` BLDMAJORVERSION=`echo "$PROPOSEDVERSION" | sed 's/\([^\.]*\)\(\.\([^.]*\)\(\.\([^.]*\)\)\?\)\?/\1/'`
BLDMINORVERSION=`echo "$PROPOSEDVERSION" | sed 's/\([^\.]*\)\(\.\([^.]*\)\(\.\([^.]*\)\)\?\)\?/\3/'` BLDMINORVERSION=`echo "$PROPOSEDVERSION" | sed 's/\([^\.]*\)\(\.\([^.]*\)\(\.\([^.]*\)\)\?\)\?/\3/'`
...@@ -53,15 +53,15 @@ fi ...@@ -53,15 +53,15 @@ fi
if [ "$BLDVARIANTVERSION" == "" ]; then if [ "$BLDVARIANTVERSION" == "" ]; then
BLDVARIANTVERSION=0 BLDVARIANTVERSION=0
fi fi
SVNOPENSOURCEREVISION=`svn info | grep '^Revision' | sed -r 's/^Revision: (.*\S+)\s*$/\1/'` SVNOPENSOURCEREVISION=`svn info | grep '^Revision' | sed -r 's/^Revision: (.+?)[\r\n]*$/\1/'`
BLDNMBR="$PROPOSEDVERSION" BLDNMBR="$PROPOSEDVERSION"
BLDNMBRSHORT="$BLDNMBR" BLDNMBRSHORT="$BLDNMBR"
if [ "$RC_PROJECTSOURCEVERSION" == "" ]; then if [ "$RC_PROJECTSOURCEVERSION" == "" ]; then
BLDNMBRSHORT="$BLDNMBRSHORT+" BLDNMBRSHORT="$BLDNMBRSHORT+"
BLDUSERNAME=`echo "$(whoami)" | sed -r 's/(.*\S+)\s*$/\1/'` BLDUSERNAME=`echo "$(whoami)" | sed -r 's/(.+?)[\r\n]*$/\1/'`
BLDDATE=`echo "$(date)" | sed -r 's/(.*\S+)\s*$/\1/'` BLDDATE=`echo "$(date)" | sed -r 's/(.+?)[\r\n]*$/\1/'`
BLDNMBR="$BLDNMBRSHORT $BLDUSERNAME - $BLDDATE - r$SVNOPENSOURCEREVISION" BLDNMBR="$BLDNMBRSHORT $BLDUSERNAME - $BLDDATE - r$SVNOPENSOURCEREVISION"
fi fi
......
2009-08-12 Peter Kasting <pkasting@google.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=27323
Change pattern that strips all trailing whitespace to just remove EOL
chars (\r, \n), to make it clear that varying EOL chars is the primary
problem being solved.
* Scripts/prepare-ChangeLog:
* Scripts/resolve-ChangeLogs:
* Scripts/svn-create-patch:
* Scripts/update-webkit:
2009-08-12 Kevin Ollivier <kevino@theolliviers.com> 2009-08-12 Kevin Ollivier <kevino@theolliviers.com>
wx waf build fix, add new directories to the build. wx waf build fix, add new directories to the build.
......
...@@ -326,7 +326,7 @@ if (@logs && $updateChangeLogs && $isSVN) { ...@@ -326,7 +326,7 @@ if (@logs && $updateChangeLogs && $isSVN) {
my @conflictedChangeLogs; my @conflictedChangeLogs;
while (my $line = <ERRORS>) { while (my $line = <ERRORS>) {
print STDERR " ", $line; print STDERR " ", $line;
push @conflictedChangeLogs, $1 if $line =~ m/^C\s+(.*\S+)\s*$/; push @conflictedChangeLogs, $1 if $line =~ m/^C\s+(.+?)[\r\n]*$/;
} }
close ERRORS; close ERRORS;
...@@ -1323,7 +1323,7 @@ sub createPatchCommand($) ...@@ -1323,7 +1323,7 @@ sub createPatchCommand($)
sub diffHeaderFormat() sub diffHeaderFormat()
{ {
return qr/^Index: (\S+)\s*$/ if $isSVN; return qr/^Index: (\S+)[\r\n]*$/ if $isSVN;
return qr/^diff --git a\/.+ b\/(.+)$/ if $isGit; return qr/^diff --git a\/.+ b\/(.+)$/ if $isGit;
} }
...@@ -1333,7 +1333,7 @@ sub findOriginalFileFromSvn($) ...@@ -1333,7 +1333,7 @@ sub findOriginalFileFromSvn($)
my $baseUrl; my $baseUrl;
open INFO, "$SVN info . |" or die; open INFO, "$SVN info . |" or die;
while (<INFO>) { while (<INFO>) {
if (/^URL: (.*\S+)\s*$/) { if (/^URL: (.+?)[\r\n]*$/) {
$baseUrl = $1; $baseUrl = $1;
} }
} }
...@@ -1341,7 +1341,7 @@ sub findOriginalFileFromSvn($) ...@@ -1341,7 +1341,7 @@ sub findOriginalFileFromSvn($)
my $sourceFile; my $sourceFile;
open INFO, "$SVN info '$file' |" or die; open INFO, "$SVN info '$file' |" or die;
while (<INFO>) { while (<INFO>) {
if (/^Copied From URL: (.*\S+)\s*$/) { if (/^Copied From URL: (.+?)[\r\n]*$/) {
$sourceFile = File::Spec->abs2rel($1, $baseUrl); $sourceFile = File::Spec->abs2rel($1, $baseUrl);
} }
} }
...@@ -1362,11 +1362,11 @@ sub generateFileList(\@\@\%) ...@@ -1362,11 +1362,11 @@ sub generateFileList(\@\@\%)
if ($isSVN) { if ($isSVN) {
my $matches; my $matches;
if (eval "v$svnVersion" ge v1.6) { if (eval "v$svnVersion" ge v1.6) {
$matches = /^([ACDMR]).{6} (.*\S+)\s*$/; $matches = /^([ACDMR]).{6} (.+?)[\r\n]*$/;
$status = $1; $status = $1;
$file = $2; $file = $2;
} else { } else {
$matches = /^([ACDMR]).{5} (.*\S+)\s*$/; $matches = /^([ACDMR]).{5} (.+?)[\r\n]*$/;
$status = $1; $status = $1;
$file = $2; $file = $2;
} }
......
...@@ -256,10 +256,10 @@ sub findUnmergedChangeLogs() ...@@ -256,10 +256,10 @@ sub findUnmergedChangeLogs()
my $matches; my $matches;
my $file; my $file;
if (eval "v$svnVersion" ge v1.6) { if (eval "v$svnVersion" ge v1.6) {
$matches = /^([C]).{6} (.*\S+)\s*$/; $matches = /^([C]).{6} (.+?)[\r\n]*$/;
$file = $2; $file = $2;
} else { } else {
$matches = /^([C]).{5} (.*\S+)\s*$/; $matches = /^([C]).{5} (.+?)[\r\n]*$/;
$file = $2; $file = $2;
} }
if ($matches) { if ($matches) {
......
...@@ -156,7 +156,7 @@ sub findBaseUrl($) ...@@ -156,7 +156,7 @@ sub findBaseUrl($)
my $baseUrl; my $baseUrl;
open INFO, "svn info '$infoPath' |" or die; open INFO, "svn info '$infoPath' |" or die;
while (<INFO>) { while (<INFO>) {
if (/^URL: (.*\S+)\s*$/) { if (/^URL: (.+?)[\r\n]*$/) {
$baseUrl = $1; $baseUrl = $1;
} }
} }
...@@ -200,7 +200,7 @@ sub findSourceFileAndRevision($) ...@@ -200,7 +200,7 @@ sub findSourceFileAndRevision($)
my $sourceRevision; my $sourceRevision;
open INFO, "svn info '$file' |" or die; open INFO, "svn info '$file' |" or die;
while (<INFO>) { while (<INFO>) {
if (/^Copied From URL: (.*\S+)\s*$/) { if (/^Copied From URL: (.+?)[\r\n]*$/) {
$sourceFile = File::Spec->abs2rel($1, $baseUrl); $sourceFile = File::Spec->abs2rel($1, $baseUrl);
} elsif (/^Copied From Rev: ([0-9]+)/) { } elsif (/^Copied From Rev: ([0-9]+)/) {
$sourceRevision = $1; $sourceRevision = $1;
......
...@@ -80,7 +80,7 @@ sub runSvnUpdate() ...@@ -80,7 +80,7 @@ sub runSvnUpdate()
my @conflictedChangeLogs; my @conflictedChangeLogs;
while (my $line = <UPDATE>) { while (my $line = <UPDATE>) {
print $line; print $line;
$line =~ m/^C\s+(.*\S+)\s*$/; $line =~ m/^C\s+(.+?)[\r\n]*$/;
if ($1) { if ($1) {
my $filename = normalizePath($1); my $filename = normalizePath($1);
push @conflictedChangeLogs, $filename if basename($filename) eq "ChangeLog"; push @conflictedChangeLogs, $filename if basename($filename) eq "ChangeLog";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment