Add the ability to report a commit with sub-commits.
authordewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2017 09:10:29 +0000 (09:10 +0000)
committerdewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2017 09:10:29 +0000 (09:10 +0000)
commit2a5dc3fdc5a765c46ded634faa618e7c31b745cd
tree382fcfd2eb83faf287b5337681996a819f8d0b77
parent8ae4639ce919da15f5f4ea66766603b81a8f27e6
Add the ability to report a commit with sub-commits.
https://bugs.webkit.org/show_bug.cgi?id=168962

Reviewed by Ryosuke Niwa.

Introduce 'commit_ownerships' which records ownership between commits.
On existing production server, run ```
    CREATE TABLE commit_ownerships (
        commit_owner integer NOT NULL REFERENCES commits ON DELETE CASCADE,
        commit_ownee integer NOT NULL REFERENCES commits ON DELETE CASCADE,
        PRIMARY KEY (commit_owner, commit_ownee)
    );
    ALTER TABLE repositories RENAME repository_parent TO repository_owner;
    ALTER TABLE repositories DROP repository_name_must_be_unique;
    CREATE UNIQUE INDEX repository_name_owner_unique_index ON repositories (repository_owner, repository_name) WHERE repository_owner IS NOT NULL;
    CREATE UNIQUE INDEX repository_name_unique_index ON repositories (repository_name) WHERE repository_owner IS NULL;
``` to update database.
Add unit-tests to cover this change.

* init-database.sql:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* public/include/db.php:
* public/include/manifest-generator.php:
* public/include/report-processor.php:
* public/v3/models/repository.js:
(Repository):
(Repository.prototype.owner):
* server-tests/admin-reprocess-report-tests.js:
(addBuilderForReport.simpleReportWithRevisions.0.then):
(then):
* server-tests/api-manifest.js:
(then):
* server-tests/api-report-commits-tests.js:
(addSlaveForReport.sameRepositoryNameInSubCommitAndMajorCommit.then):
(then):
(addSlaveForReport.systemVersionCommitWithSubcommits.then):
(addSlaveForReport.multipleSystemVersionCommitsWithSubcommits.then):
(addSlaveForReport.systemVersionCommitWithEmptySubcommits.then):
(addSlaveForReport.systemVersionCommitAndSubcommitWithTimestamp.then):
* tools/js/database.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/init-database.sql
Websites/perf.webkit.org/public/api/report-commits.php
Websites/perf.webkit.org/public/include/commit-log-fetcher.php
Websites/perf.webkit.org/public/include/db.php
Websites/perf.webkit.org/public/include/manifest-generator.php
Websites/perf.webkit.org/public/include/report-processor.php
Websites/perf.webkit.org/public/v3/models/repository.js
Websites/perf.webkit.org/server-tests/admin-reprocess-report-tests.js
Websites/perf.webkit.org/server-tests/api-manifest.js
Websites/perf.webkit.org/server-tests/api-report-commits-tests.js
Websites/perf.webkit.org/tools/js/database.js