<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[46095] trunk/WebKitTools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/46095">46095</a></dd>
<dt>Author</dt> <dd>pkasting@chromium.org</dd>
<dt>Date</dt> <dd>2009-07-18 11:50:02 -0700 (Sat, 18 Jul 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>2009-07-17  Peter Kasting  &lt;pkasting@google.com&gt;

        Reviewed by David Kilzer.

        https://bugs.webkit.org/show_bug.cgi?id=27323
        Further improve non-Cygwin SVN support.

        * Scripts/prepare-ChangeLog: Harmless change to be consistent with other
          places that consume whitespace at the end of svn output.
        * Scripts/resolve-ChangeLogs: Add support for SVN 1.6.  Slightly
          optimize svn info parsing based on technique in svn-create-patch.
          Normalize paths and consume whitespace in the same way as
          prepare-ChangeLog, for Windows systems with a non-Cygwin SVN.  Force
          diff and patch to run in binary mode so that they won't
          &quot;intelligently&quot; screw up line endings.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebKitToolsChangeLog">trunk/WebKitTools/ChangeLog</a></li>
<li><a href="#trunkWebKitToolsScriptsprepareChangeLog">trunk/WebKitTools/Scripts/prepare-ChangeLog</a></li>
<li><a href="#trunkWebKitToolsScriptsresolveChangeLogs">trunk/WebKitTools/Scripts/resolve-ChangeLogs</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebKitToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/ChangeLog (46094 => 46095)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/ChangeLog        2009-07-18 17:48:32 UTC (rev 46094)
+++ trunk/WebKitTools/ChangeLog        2009-07-18 18:50:02 UTC (rev 46095)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2009-07-17  Peter Kasting  &lt;pkasting@google.com&gt;
+
+        Reviewed by David Kilzer.
+
+        https://bugs.webkit.org/show_bug.cgi?id=27323
+        Further improve non-Cygwin SVN support.
+
+        * Scripts/prepare-ChangeLog: Harmless change to be consistent with other
+          places that consume whitespace at the end of svn output.
+        * Scripts/resolve-ChangeLogs: Add support for SVN 1.6.  Slightly
+          optimize svn info parsing based on technique in svn-create-patch.
+          Normalize paths and consume whitespace in the same way as
+          prepare-ChangeLog, for Windows systems with a non-Cygwin SVN.  Force
+          diff and patch to run in binary mode so that they won't
+          &quot;intelligently&quot; screw up line endings.
+
</ins><span class="cx"> 2009-07-18  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix Tiger DRT build.
</span></span></pre></div>
<a id="trunkWebKitToolsScriptsprepareChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/Scripts/prepare-ChangeLog (46094 => 46095)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/Scripts/prepare-ChangeLog        2009-07-18 17:48:32 UTC (rev 46094)
+++ trunk/WebKitTools/Scripts/prepare-ChangeLog        2009-07-18 18:50:02 UTC (rev 46095)
</span><span class="lines">@@ -1280,7 +1280,7 @@
</span><span class="cx"> 
</span><span class="cx"> sub diffHeaderFormat()
</span><span class="cx"> {
</span><del>-    return qr/^Index: (\S+)\r?\n?$/ if $isSVN;
</del><ins>+    return qr/^Index: (\S+)\s*$/ if $isSVN;
</ins><span class="cx">     return qr/^diff --git a\/.+ b\/(.+)$/ if $isGit;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1290,7 +1290,7 @@
</span><span class="cx">     my $baseUrl;
</span><span class="cx">     open INFO, &quot;$SVN info . |&quot; or die;
</span><span class="cx">     while (&lt;INFO&gt;) {
</span><del>-        if (/^URL: (.*\S+)\r?\n?$/) {
</del><ins>+        if (/^URL: (.*\S+)\s*$/) {
</ins><span class="cx">             $baseUrl = $1;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -1298,7 +1298,7 @@
</span><span class="cx">     my $sourceFile;
</span><span class="cx">     open INFO, &quot;$SVN info '$file' |&quot; or die;
</span><span class="cx">     while (&lt;INFO&gt;) {
</span><del>-        if (/^Copied From URL: (.*\S+)\r?\n?$/) {
</del><ins>+        if (/^Copied From URL: (.*\S+)\s*$/) {
</ins><span class="cx">             $sourceFile = File::Spec-&gt;abs2rel($1, $baseUrl);
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -1319,11 +1319,11 @@
</span><span class="cx">         if ($isSVN) {
</span><span class="cx">             my $matches;
</span><span class="cx">             if (eval &quot;v$svnVersion&quot; ge v1.6) {
</span><del>-                $matches = /^([ACDMR]).{6} (.*\S+)\r?\n?$/;
</del><ins>+                $matches = /^([ACDMR]).{6} (.*\S+)\s*$/;
</ins><span class="cx">                 $status = $1;
</span><span class="cx">                 $file = $2;
</span><span class="cx">             } else {
</span><del>-                $matches = /^([ACDMR]).{5} (.*\S+)\r?\n?$/;
</del><ins>+                $matches = /^([ACDMR]).{5} (.*\S+)\s*$/;
</ins><span class="cx">                 $status = $1;
</span><span class="cx">                 $file = $2;
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkWebKitToolsScriptsresolveChangeLogs"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/Scripts/resolve-ChangeLogs (46094 => 46095)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/Scripts/resolve-ChangeLogs        2009-07-18 17:48:32 UTC (rev 46094)
+++ trunk/WebKitTools/Scripts/resolve-ChangeLogs        2009-07-18 18:50:02 UTC (rev 46095)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> sub resolveConflict($);
</span><span class="cx"> sub showStatus($;$);
</span><span class="cx"> sub usageAndExit();
</span><ins>+sub normalizePath($);
</ins><span class="cx"> 
</span><span class="cx"> my $isGit = isGit();
</span><span class="cx"> my $isSVN = isSVN();
</span><span class="lines">@@ -61,6 +62,8 @@
</span><span class="cx"> my $SVN = &quot;svn&quot;;
</span><span class="cx"> my $GIT = &quot;git&quot;;
</span><span class="cx"> 
</span><ins>+my $svnVersion = `svn --version --quiet` if $isSVN;
+
</ins><span class="cx"> my $fixMerged;
</span><span class="cx"> my $gitRebaseContinue = 0;
</span><span class="cx"> my $printWarnings = 1;
</span><span class="lines">@@ -164,7 +167,10 @@
</span><span class="cx">         my $currentRevision;
</span><span class="cx">         open INFO, &quot;-|&quot;, $SVN, &quot;info&quot;, $file || die;
</span><span class="cx">         while (my $line = &lt;INFO&gt;) {
</span><del>-            $currentRevision = $1 if $line =~ m/^Revision: ([0-9]+)/;
</del><ins>+            if ($line =~ m/^Revision: ([0-9]+)/) {
+                $currentRevision = $1;
+                { local $/ = undef; &lt;INFO&gt;; }  # Consume rest of input.
+            }
</ins><span class="cx">         }
</span><span class="cx">         close INFO;
</span><span class="cx">         $fileNewer = &quot;${file}.r${currentRevision}&quot; if -e &quot;${file}.r${currentRevision}&quot;;
</span><span class="lines">@@ -236,15 +242,24 @@
</span><span class="cx">     open STAT, &quot;-|&quot;, $statCommand or die &quot;The status failed: $!.\n&quot;;
</span><span class="cx">     while (&lt;STAT&gt;) {
</span><span class="cx">         if ($isSVN) {
</span><del>-            if (/^([C]).{5} (.+)$/) {
-                my $file = findChangeLog($2);
</del><ins>+            my $matches;
+            my $file;
+            if (eval &quot;v$svnVersion&quot; ge v1.6) {
+                $matches = /^([C]).{6} (.*\S+)\s*$/;
+                $file = $2;
+            } else {
+                $matches = /^([C]).{5} (.*\S+)\s*$/;
+                $file = $2;
+            }
+            if ($matches) {
+                $file = findChangeLog(normalizePath($file));
</ins><span class="cx">                 push @results, $file if $file;
</span><span class="cx">             } else {
</span><span class="cx">                 print;  # error output from svn stat
</span><span class="cx">             }
</span><span class="cx">         } elsif ($isGit) {
</span><span class="cx">             if (/^([U])\t(.+)$/) {
</span><del>-                my $file = findChangeLog($2);
</del><ins>+                my $file = findChangeLog(normalizePath($2));
</ins><span class="cx">                 push @results, $file if $file;
</span><span class="cx">             } else {
</span><span class="cx">                 print;  # error output from git diff
</span><span class="lines">@@ -419,7 +434,7 @@
</span><span class="cx">         rename($fileMine, &quot;$fileMine.save&quot;);
</span><span class="cx">         rename($fileOlder, &quot;$fileOlder.save&quot;);
</span><span class="cx">     } else {
</span><del>-        open(DIFF, &quot;-|&quot;, qw(diff -u), $fileOlder, $fileMine) || die;
</del><ins>+        open(DIFF, &quot;-|&quot;, qw(diff -u -a --binary), $fileOlder, $fileMine) || die;
</ins><span class="cx">         $patch = &lt;DIFF&gt;;
</span><span class="cx">         close(DIFF);
</span><span class="cx">     }
</span><span class="lines">@@ -427,7 +442,7 @@
</span><span class="cx">     unlink(&quot;${fileNewer}.orig&quot;);
</span><span class="cx">     unlink(&quot;${fileNewer}.rej&quot;);
</span><span class="cx"> 
</span><del>-    open(PATCH, &quot;| patch --fuzz=3 $fileNewer &gt; /dev/null&quot;) || die;
</del><ins>+    open(PATCH, &quot;| patch --fuzz=3 --binary $fileNewer &gt; /dev/null&quot;) || die;
</ins><span class="cx">     print PATCH fixChangeLogPatch($patch);
</span><span class="cx">     close(PATCH);
</span><span class="cx"> 
</span><span class="lines">@@ -534,3 +549,10 @@
</span><span class="cx">         die &quot;Unknown version control system&quot;;
</span><span class="cx">     }
</span><span class="cx"> }
</span><ins>+
+sub normalizePath($)
+{
+    my ($path) = @_;
+    $path =~ s/\\/\//g;
+    return $path;
+}
</ins></span></pre>
</div>
</div>

</body>
</html>