Title: [176361] trunk/Tools
Revision
176361
Author
[email protected]
Date
2014-11-19 15:58:03 -0800 (Wed, 19 Nov 2014)

Log Message

Work around the fact that different masters may have different names for their codebases.
https://bugs.webkit.org/show_bug.cgi?id=138878

Reviewed by Mark Rowe.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(parseRevisionProperty): Changed.
Take a "fallback key" in addition to the primary key, so we can deal with inconsistencies in
opensource / internal codebase naming convention.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js (176360 => 176361)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js	2014-11-19 23:55:09 UTC (rev 176360)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js	2014-11-19 23:58:03 UTC (rev 176361)
@@ -96,12 +96,14 @@
     return property[0] === "got_revision" && typeof property[1] === "object";
 }
 
-function parseRevisionProperty(property, key)
+function parseRevisionProperty(property, key, fallbackKey)
 {
     if (!property)
         return null;
     var value = property[1];
-    return parseInt(isMultiCodebaseGotRevisionProperty(property) ? value[key] : value, 10);
+    if (isMultiCodebaseGotRevisionProperty(property))
+        value = (key in value) ? value[key] : value[fallbackKey];
+    return parseInt(value);
 }
 
 BuildbotIteration.prototype = {
@@ -242,8 +244,6 @@
         //
         // ["got_revision",{"Internal":"1357","WebKitOpenSource":"2468"},"Source"]
         // OR
-        // ["got_revision","2468_1357","Source"]
-        // OR
         // ["got_revision","2468","Source"]
         //
         // When extracting the OpenSource revision from property got_revision we don't need to check whether the
@@ -252,11 +252,11 @@
         // revision. Therefore, we only look at got_revision to extract the Internal revision when it's
         // a dictionary.
 
-        var openSourceRevisionProperty = data.properties.findFirst(function(property) { return property[0] === "got_revision" || property[0] === "revision" || property[0] === "opensource_got_revision"; });
-        this.openSourceRevision = parseRevisionProperty(openSourceRevisionProperty, "WebKit");
+        var openSourceRevisionProperty = data.properties.findFirst(function(property) { return property[0] === "got_revision"; });
+        this.openSourceRevision = parseRevisionProperty(openSourceRevisionProperty, "WebKit", "opensource");
 
-        var internalRevisionProperty = data.properties.findFirst(function(property) { return property[0] === "internal_got_revision" || isMultiCodebaseGotRevisionProperty(property); });
-        this.internalRevision = parseRevisionProperty(internalRevisionProperty, "Internal");
+        var internalRevisionProperty = data.properties.findFirst(function(property) { return isMultiCodebaseGotRevisionProperty(property); });
+        this.internalRevision = parseRevisionProperty(internalRevisionProperty, "Internal", "internal");
 
         function sourceStampChanges(sourceStamp) {
             var result = [];

Modified: trunk/Tools/ChangeLog (176360 => 176361)


--- trunk/Tools/ChangeLog	2014-11-19 23:55:09 UTC (rev 176360)
+++ trunk/Tools/ChangeLog	2014-11-19 23:58:03 UTC (rev 176361)
@@ -1,3 +1,15 @@
+2014-11-19  Dana Burkart  <[email protected]>
+
+        Work around the fact that different masters may have different names for their codebases.
+        https://bugs.webkit.org/show_bug.cgi?id=138878
+
+        Reviewed by Mark Rowe.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
+        (parseRevisionProperty): Changed.
+        Take a "fallback key" in addition to the primary key, so we can deal with inconsistencies in
+        opensource / internal codebase naming convention.
+
 2014-11-19  Chris Fleizach  <[email protected]>
 
         AX: Screen braille input doesn't work on forms.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to