Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add support for Trac instances that host multiple projects.
https://bugs.webkit.org/show_bug.cgi?id=167524 Patch by Kocsen Chung <kocsen_chung@apple.com> on 2017-01-30 Reviewed by Alexey Proskuryakov. When multiple projects are hosted on a single Trac instance, the current behavior will retrieve changesets from all tracked projects. This patch teaches Trac.js to get project-specific changesets from Trac. We do this by replacing the parameter `changeset=on` to `repo-projectname=on` when querying the Trac timeline. To tell Trac to be aware of multi-project instances we leverage the `options` parameter when creating a new instance: new Trac("https://mytrac.com/", { projectCanonical link: https://commits.webkit.org/"tracProjectName" }); If this option is not provided, the original behaviour will prevail. Additionally, add corresponding tests. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js: (Trac): Reason about new optional parameter 'projectIdentifier'. (Trac.prototype.revisionURL): Given a projectIdentifier, append it to the end of the URL. (Trac.prototype._xmlTimelineURL): Given a projectIdentifier, replace default parameter `changeset=on` with `repo-projectname=on`. (Trac.prototype._convertCommitInfoElementToObject): Fix missing ';'. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockTrac.js: (MockTrac): Add support for instantiating Trac with a projectIdentifier. * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js: (setup): Provide a multiple-project MockTrac instance to all test cases for testing. Add the following tests: test("revisionURL") test("revisionURL with Trac Identifier") test("_xmlTimelineURL") test("_xmlTimelineURL with Trac Identifier") (this.view._latestProductiveIteration): Fix missing ';'. Canonical link: https://commits.webkit.org/184629@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
964f1b9
commit 60143df722931ccbdbcfa9f8946a01b10848787d
Showing
4 changed files
with
97 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters