Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js (195075 => 195076)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js 2016-01-14 21:42:35 UTC (rev 195075)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js 2016-01-14 22:33:02 UTC (rev 195076)
@@ -110,7 +110,7 @@
new PopoverTracker(messageElement, this._presentPopoverForPendingCommits.bind(this), queue);
},
- _popoverLinesForCommitRange: function(trac, branch, firstRevisionNumber, lastRevisionNumber)
+ _popoverLinesForCommitRange: function(trac, branchName, firstRevisionNumber, lastRevisionNumber)
{
function lineForCommit(trac, commit)
{
@@ -141,7 +141,7 @@
// FIXME: To be 100% correct, we should also filter out changes that are ignored by
// the queue, see _should_file_trigger_build in wkbuild.py.
- var commits = trac.commitsOnBranch(branch, function(commit) { return commit.revisionNumber >= firstRevisionNumber && commit.revisionNumber <= lastRevisionNumber; });
+ var commits = trac.commitsOnBranch(branchName, function(commit) { return commit.revisionNumber >= firstRevisionNumber && commit.revisionNumber <= lastRevisionNumber; });
return commits.map(function(commit) {
return lineForCommit(trac, commit);
}, this).reverse();
@@ -188,7 +188,7 @@
content.className = "commit-history-popover";
// FIXME: Nothing guarantees that Trac has historical data for these revisions.
- var linesForCommits = this._popoverLinesForCommitRange(context.trac, context.branch, context.firstRevision, context.lastRevision);
+ var linesForCommits = this._popoverLinesForCommitRange(context.trac, context.branchName, context.firstRevision, context.lastRevision);
var line = document.createElement("div");
line.className = "title";
@@ -198,7 +198,7 @@
content.appendChild(line);
this._addDividerToPopover(content);
} else {
- line.textContent = "no commits to " + context.branch + " since previous result";
+ line.textContent = "no commits to " + context.branchName + " since previous result";
content.appendChild(line);
}
@@ -232,7 +232,7 @@
console.assert(previousIteration.revision[repositoryName]);
var context = {
trac: repository.trac,
- branch: branch.name,
+ branchName: branch.name,
firstRevision: previousIteration.revision[repositoryName] + 1,
lastRevision: iteration.revision[repositoryName]
};
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js (195075 => 195076)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js 2016-01-14 21:42:35 UTC (rev 195075)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js 2016-01-14 22:33:02 UTC (rev 195076)
@@ -63,10 +63,10 @@
return this.recordedCommits[this.recordedCommits.length - 1].revisionNumber;
},
- commitsOnBranch: function(branch, filter)
+ commitsOnBranch: function(branchName, filter)
{
return this.recordedCommits.filter(function(commit) {
- return (!commit.containsBranchLocation || commit.branch === branch) && filter(commit);
+ return (!commit.containsBranchLocation || commit.branchName === branchName) && filter(commit);
});
},
@@ -149,11 +149,11 @@
if (location.startsWith("tags/"))
result.tag = location.substr(5, location.indexOf("/", 5) - 5);
else if (location.startsWith("branches/"))
- result.branch = location.substr(9, location.indexOf("/", 9) - 9);
+ result.branchName = location.substr(9, location.indexOf("/", 9) - 9);
else if (location.startsWith("releases/"))
result.release = location.substr(9, location.indexOf("/", 9) - 9);
else if (location.startsWith("trunk/"))
- result.branch = "trunk";
+ result.branchName = "trunk";
else if (location.startsWith("submissions/"))
; // These changes are never relevant to the dashboard.
else {
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js (195075 => 195076)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js 2016-01-14 21:42:35 UTC (rev 195075)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js 2016-01-14 22:33:02 UTC (rev 195076)
@@ -35,7 +35,7 @@
"date": "2015-11-15T17:05:44.000Z",
"description": "description",
"containsBranchLocation": true,
- "branch": "trunk"
+ "branchName": "trunk"
},
{
"revisionNumber": 33019,
@@ -45,7 +45,7 @@
"date": "2015-11-16T01:18:23.000Z",
"description": "description",
"containsBranchLocation": true,
- "branch": "trunk"
+ "branchName": "trunk"
},
{
"revisionNumber": 33020,
@@ -55,7 +55,7 @@
"date": "2015-11-16T01:19:27.000Z",
"description": "description",
"containsBranchLocation": true,
- "branch": "trunk"
+ "branchName": "trunk"
},
{
"revisionNumber": 33021,
@@ -65,7 +65,7 @@
"date": "2015-11-16T01:20:58.000Z",
"description": "description",
"containsBranchLocation": true,
- "branch": "someOtherBranch"
+ "branchName": "someOtherBranch"
},
{
"revisionNumber": 33022,
@@ -75,7 +75,7 @@
"date": "2015-11-16T01:22:01.000Z",
"description": "description",
"containsBranchLocation": true,
- "branch": "trunk"
+ "branchName": "trunk"
}
];
};
Modified: trunk/Tools/ChangeLog (195075 => 195076)
--- trunk/Tools/ChangeLog 2016-01-14 21:42:35 UTC (rev 195075)
+++ trunk/Tools/ChangeLog 2016-01-14 22:33:02 UTC (rev 195076)
@@ -1,5 +1,25 @@
2016-01-14 Jason Marcell <[email protected]>
+ Standardize the usage of "branch" vs. "branchName".
+ https://bugs.webkit.org/show_bug.cgi?id=152982
+
+ Reviewed by Daniel Bates.
+
+ In an earlier patch we started using the name "branch" to indicate a branch object, whereas
+ "branchName" implies that the variable or property in question is simply a string.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
+ (BuildbotQueueView.prototype._popoverLinesForCommitRange): Change branch to branchName.
+ (BuildbotQueueView.prototype._presentPopoverForRevisionRange): Change branch to branch.name.
+ (BuildbotQueueView.prototype._revisionContentWithPopoverForIteration): Change branch to branchName.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
+ (Trac.prototype.commitsOnBranch): Change branch to branchName.
+ (Trac.prototype._convertCommitInfoElementToObject): Ditto.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js:
+ (MockTrac): Ditto.
+
+2016-01-14 Jason Marcell <[email protected]>
+
Add a unit test to test BuildbotQueueView._appendPendingRevisionCount.
https://bugs.webkit.org/show_bug.cgi?id=152910