Support Trac 1.0.x XML timeline link format
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Oct 2015 17:49:08 +0000 (17:49 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Oct 2015 17:49:08 +0000 (17:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149786

Reviewed by Lucas Forschler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
(Trac.prototype._convertCommitInfoElementToObject):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190550 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js
Tools/ChangeLog

index 8321668..77bad79 100644 (file)
@@ -90,7 +90,14 @@ Trac.prototype = {
     _convertCommitInfoElementToObject: function(doc, commitElement)
     {
         var link = doc.evaluate("./link", commitElement, null, XPathResult.STRING_TYPE).stringValue;
-        var revisionNumber = parseInt(/\d+$/.exec(link))
+
+        // There are multiple link formats for Trac that we support:
+        // https://trac.webkit.org/changeset/190497
+        // http://trac.foobar.com/repository/changeset/75388/project
+        var linkComponents = link.split("/");
+        var revisionNumber = parseInt(linkComponents.pop());
+        if (!revisionNumber)
+            var revisionNumber = parseInt(linkComponents.pop());
 
         function tracNSResolver(prefix)
         {
index 95b0d5d..7a23e29 100644 (file)
@@ -1,5 +1,15 @@
 2015-10-04  Alexey Proskuryakov  <ap@apple.com>
 
+        Support Trac 1.0.x XML timeline link format
+        https://bugs.webkit.org/show_bug.cgi?id=149786
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
+        (Trac.prototype._convertCommitInfoElementToObject):
+
+2015-10-04  Alexey Proskuryakov  <ap@apple.com>
+
         Fix some errors on bot watcher's dashboard
         https://bugs.webkit.org/show_bug.cgi?id=149789