<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[25916] trunk/WebKitTools</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/25916">25916</a></dd>
<dt>Author</dt> <dd>bdash</dd>
<dt>Date</dt> <dd>2007-10-02 03:34:32 -0700 (Tue, 02 Oct 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>2007-10-02  Mark Rowe  &lt;mrowe@apple.com&gt;

        Reviewed by Oliver.

        Update WebKitLauncher to notify you of new builds from the correct branch, rather than always checking trunk.

        * BuildSlaveSupport/build-launcher-app: Generate a file named BRANCH into WebKit.app so that it knows which branch it was built from.
        * WebKitLauncher/start.html: Use the new URL format that includes the branch we were built from.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebKitToolsBuildSlaveSupportbuildlauncherapp">trunk/WebKitTools/BuildSlaveSupport/build-launcher-app</a></li>
<li><a href="#trunkWebKitToolsChangeLog">trunk/WebKitTools/ChangeLog</a></li>
<li><a href="#trunkWebKitToolsWebKitLauncherstarthtml">trunk/WebKitTools/WebKitLauncher/start.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebKitToolsBuildSlaveSupportbuildlauncherapp"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/BuildSlaveSupport/build-launcher-app (25915 => 25916)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/BuildSlaveSupport/build-launcher-app        2007-10-02 09:13:00 UTC (rev 25915)
+++ trunk/WebKitTools/BuildSlaveSupport/build-launcher-app        2007-10-02 10:34:32 UTC (rev 25916)
</span><span class="lines">@@ -49,11 +49,24 @@
</span><span class="cx">     chdirWebKit();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub currentSVNBranch
+{
+    my $sourceDir = sourceDir();
+    my $svnInfo = `LC_ALL=C svn info $sourceDir | grep URL:`;
+    (my $url) = ($svnInfo =~ m/URL: (.+)/g);
+    (my $branch) = ($url =~ m/\/svn\/webkit\/(trunk|branches\/[^\/]+)/);
+    die &quot;Unable to determine current SVN branch in $sourceDir&quot; unless (defined $branch);
+    $branch =~ s/^branches\///;
+    return $branch
+}
+
</ins><span class="cx"> sub copyNightlyLauncher
</span><span class="cx"> {
</span><span class="cx">     my $revision = currentSVNRevision();
</span><ins>+    my $branch = currentSVNBranch();
</ins><span class="cx">     my $infoPlist = &quot;$nightlyLauncherStagingPath/Contents/Info.plist&quot;;
</span><span class="cx">     my $versionFile = &quot;$nightlyLauncherStagingPath/Contents/Resources/VERSION&quot;;
</span><ins>+    my $branchFile = &quot;$nightlyLauncherStagingPath/Contents/Resources/BRANCH&quot;;
</ins><span class="cx">     my $data;
</span><span class="cx">     open(IN, $infoPlist) or die &quot;Couldn't open Info.plist in built application for reading&quot;;
</span><span class="cx">     {
</span><span class="lines">@@ -70,6 +83,10 @@
</span><span class="cx">     print OUT &quot;$revision\n&quot;;
</span><span class="cx">     close(OUT);
</span><span class="cx"> 
</span><ins>+    open(OUT, &quot;&gt;$branchFile&quot;) or die &quot;Couldn't open BRANCH in built application for writing&quot;;
+    print OUT &quot;$branch\n&quot;;
+    close(OUT);
+
</ins><span class="cx">     my @frameworks = (&quot;JavaScriptCore&quot;, &quot;JavaScriptGlue&quot;, &quot;WebCore&quot;, &quot;WebKit&quot;);
</span><span class="cx">     for my $framework (@frameworks) {
</span><span class="cx">         system(&quot;ditto&quot;, productDir() . &quot;/$framework.framework&quot;, &quot;$nightlyLauncherStagingPath/Contents/Resources/$framework.framework&quot;) == 0 or die &quot;Failed copying $framework.framework into $nightlyLauncherStagingPath&quot;;
</span></span></pre></div>
<a id="trunkWebKitToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/ChangeLog (25915 => 25916)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/ChangeLog        2007-10-02 09:13:00 UTC (rev 25915)
+++ trunk/WebKitTools/ChangeLog        2007-10-02 10:34:32 UTC (rev 25916)
</span><span class="lines">@@ -1,5 +1,14 @@
</span><span class="cx"> 2007-10-02  Mark Rowe  &lt;mrowe@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Reviewed by Oliver.
+
+        Update WebKitLauncher to notify you of new builds from the correct branch, rather than always checking trunk.
+
+        * BuildSlaveSupport/build-launcher-app: Generate a file named BRANCH into WebKit.app so that it knows which branch it was built from.
+        * WebKitLauncher/start.html: Use the new URL format that includes the branch we were built from.
+
+2007-10-02  Mark Rowe  &lt;mrowe@apple.com&gt;
+
</ins><span class="cx">         Rubber-stamped by Maciej.
</span><span class="cx"> 
</span><span class="cx">         Configuration changes from build.webkit.org.  The major change is refactoring to work
</span></span></pre></div>
<a id="trunkWebKitToolsWebKitLauncherstarthtml"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/WebKitLauncher/start.html (25915 => 25916)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/WebKitLauncher/start.html        2007-10-02 09:13:00 UTC (rev 25915)
+++ trunk/WebKitTools/WebKitLauncher/start.html        2007-10-02 10:34:32 UTC (rev 25916)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx">     &lt;head&gt;
</span><span class="cx">         &lt;title&gt;Loading WebKit...&lt;/title&gt;
</span><del>-        &lt;meta http-equiv=&quot;refresh&quot; content=&quot;1;URL=http://nightly.webkit.org/start/?current-revision=unknown&quot; /&gt;
</del><ins>+        &lt;meta http-equiv=&quot;refresh&quot; content=&quot;1;URL=http://nightly.webkit.org/start/&quot; /&gt;
</ins><span class="cx">         &lt;script type=&quot;text/javascript&quot;&gt;
</span><span class="cx">             function getWebKitRevision()
</span><span class="cx">             {
</span><span class="lines">@@ -10,13 +10,22 @@
</span><span class="cx">                 request.send();
</span><span class="cx">                 var revision = parseInt(request.responseText);
</span><span class="cx">                 if (isNaN(revision))
</span><del>-                    return &quot;unknown&quot;;
</del><ins>+                    return &quot;&quot;;
</ins><span class="cx"> 
</span><span class="cx">                 return revision;
</span><span class="cx">             }
</span><span class="cx"> 
</span><ins>+            function getWebKitBranch()
+            {
+                var request = new XMLHttpRequest();
+                request.open(&quot;GET&quot;, &quot;BRANCH&quot;, false);
+                request.send();
+                return (request.responseText || &quot;trunk&quot;).replace(/\s/g, '')
+            }
+
</ins><span class="cx">             var revision = getWebKitRevision();
</span><del>-            document.location = &quot;http://nightly.webkit.org/start/?current-revision=&quot; + revision;
</del><ins>+            var branch = getWebKitBranch();
+            document.location = &quot;http://nightly.webkit.org/start/&quot; + branch + &quot;/&quot; + revision;
</ins><span class="cx">         &lt;/script&gt;
</span><span class="cx">     &lt;/head&gt;
</span><span class="cx">     &lt;body&gt;
</span></span></pre>
</div>
</div>

</body>
</html>