mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-02 03:32:42 +01:00
(stable) Promote 2015 Week 33
This commit is contained in:
commit
e470b6bee2
198 changed files with 2246 additions and 2165 deletions
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"phabricator.uri": "https://secure.phabricator.com/",
|
||||
"unit.engine": "PhutilUnitTestEngine",
|
||||
"load": ["src/"]
|
||||
}
|
||||
|
|
8
.arcunit
Normal file
8
.arcunit
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"engines": {
|
||||
"phutil": {
|
||||
"type": "phutil",
|
||||
"include": "(\\.php$)"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -93,7 +93,7 @@ return array(
|
|||
'rsrc/css/application/policy/policy-edit.css' => '815c66f7',
|
||||
'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43',
|
||||
'rsrc/css/application/policy/policy.css' => '957ea14c',
|
||||
'rsrc/css/application/ponder/ponder-view.css' => 'fcd6b398',
|
||||
'rsrc/css/application/ponder/ponder-view.css' => '6a399881',
|
||||
'rsrc/css/application/projects/project-icon.css' => '4e3eaa5a',
|
||||
'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733',
|
||||
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5',
|
||||
|
@ -148,6 +148,7 @@ return array(
|
|||
'rsrc/css/phui/phui-tag-view.css' => '402691cc',
|
||||
'rsrc/css/phui/phui-text.css' => 'cf019f54',
|
||||
'rsrc/css/phui/phui-timeline-view.css' => 'f1bccf73',
|
||||
'rsrc/css/phui/phui-two-column-view.css' => 'add0a7d1',
|
||||
'rsrc/css/phui/phui-workboard-view.css' => '6704d68d',
|
||||
'rsrc/css/phui/phui-workpanel-view.css' => 'adec7699',
|
||||
'rsrc/css/sprite-login.css' => '1ebb9bf9',
|
||||
|
@ -400,7 +401,6 @@ return array(
|
|||
'rsrc/js/application/phortune/phortune-credit-card-form.js' => '2290aeef',
|
||||
'rsrc/js/application/policy/behavior-policy-control.js' => '7d470398',
|
||||
'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '5e9f347c',
|
||||
'rsrc/js/application/ponder/behavior-votebox.js' => '4e9b766b',
|
||||
'rsrc/js/application/projects/behavior-project-boards.js' => 'ba4fa35c',
|
||||
'rsrc/js/application/projects/behavior-project-create.js' => '065227cc',
|
||||
'rsrc/js/application/projects/behavior-reorder-columns.js' => 'e1d25dfb',
|
||||
|
@ -632,7 +632,6 @@ return array(
|
|||
'javelin-behavior-phui-object-box-tabs' => '2bfa2836',
|
||||
'javelin-behavior-policy-control' => '7d470398',
|
||||
'javelin-behavior-policy-rule-editor' => '5e9f347c',
|
||||
'javelin-behavior-ponder-votebox' => '4e9b766b',
|
||||
'javelin-behavior-project-boards' => 'ba4fa35c',
|
||||
'javelin-behavior-project-create' => '065227cc',
|
||||
'javelin-behavior-quicksand-blacklist' => '7927a7d3',
|
||||
|
@ -803,6 +802,7 @@ return array(
|
|||
'phui-text-css' => 'cf019f54',
|
||||
'phui-theme-css' => '6b451f24',
|
||||
'phui-timeline-view-css' => 'f1bccf73',
|
||||
'phui-two-column-view-css' => 'add0a7d1',
|
||||
'phui-workboard-view-css' => '6704d68d',
|
||||
'phui-workpanel-view-css' => 'adec7699',
|
||||
'phuix-action-list-view' => 'b5c256b8',
|
||||
|
@ -811,7 +811,7 @@ return array(
|
|||
'policy-css' => '957ea14c',
|
||||
'policy-edit-css' => '815c66f7',
|
||||
'policy-transaction-detail-css' => '82100a43',
|
||||
'ponder-view-css' => 'fcd6b398',
|
||||
'ponder-view-css' => '6a399881',
|
||||
'project-icon-css' => '4e3eaa5a',
|
||||
'raphael-core' => '51ee6b43',
|
||||
'raphael-g' => '40dde778',
|
||||
|
@ -1142,13 +1142,6 @@ return array(
|
|||
'javelin-stratcom',
|
||||
'javelin-dom',
|
||||
),
|
||||
'4e9b766b' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-request',
|
||||
),
|
||||
'4fdb476d' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
|
2
resources/sql/autopatches/20150806.ponder.answer.1.sql
Normal file
2
resources/sql/autopatches/20150806.ponder.answer.1.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_ponder.ponder_answer
|
||||
DROP COLUMN contentSource;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_ponder.ponder_question
|
||||
DROP COLUMN editPolicy;
|
2
resources/sql/autopatches/20150806.ponder.status.1.sql
Normal file
2
resources/sql/autopatches/20150806.ponder.status.1.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_ponder.ponder_question
|
||||
MODIFY status VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT};
|
2
resources/sql/autopatches/20150806.ponder.status.2.sql
Normal file
2
resources/sql/autopatches/20150806.ponder.status.2.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
UPDATE {$NAMESPACE}_ponder.ponder_question
|
||||
SET status = 'open' WHERE status = '0';
|
2
resources/sql/autopatches/20150806.ponder.status.3.sql
Normal file
2
resources/sql/autopatches/20150806.ponder.status.3.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
UPDATE {$NAMESPACE}_ponder.ponder_question
|
||||
SET status = 'resolved' WHERE status = '1';
|
2
resources/sql/autopatches/20150808.ponder.vote.1.sql
Normal file
2
resources/sql/autopatches/20150808.ponder.vote.1.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_ponder.ponder_question
|
||||
DROP COLUMN heat;
|
2
resources/sql/autopatches/20150808.ponder.vote.2.sql
Normal file
2
resources/sql/autopatches/20150808.ponder.vote.2.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_ponder.ponder_question
|
||||
DROP COLUMN voteCount;
|
2
resources/sql/autopatches/20150812.ponder.answer.1.sql
Normal file
2
resources/sql/autopatches/20150812.ponder.answer.1.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_ponder.ponder_answer
|
||||
ADD status VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT};
|
2
resources/sql/autopatches/20150812.ponder.answer.2.sql
Normal file
2
resources/sql/autopatches/20150812.ponder.answer.2.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
UPDATE {$NAMESPACE}_ponder.ponder_answer
|
||||
SET status = 'visible' WHERE status = '';
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('AlmanacManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
4
scripts/cache/manage_cache.php
vendored
4
scripts/cache/manage_cache.php
vendored
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorCacheManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -16,8 +16,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorDaemonManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOHELP
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('DivinerWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('DrydockManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -15,8 +15,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorFactManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorFilesManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorLipsumManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorMailManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -15,8 +15,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorRepositoryManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorSearchManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorAuditManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorAuthManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('CelerityManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorConfigManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorFeedManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('HarbormasterManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorHunksManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorInternationalizationManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorPhortuneManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorPolicyManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorSystemRemoveWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorWorkerTriggerManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorWorkerManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -14,8 +14,8 @@ EOSYNOPSIS
|
|||
);
|
||||
$args->parseStandardArguments();
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorSMSManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
$workflows[] = new PhutilHelpArgumentWorkflow();
|
||||
$args->parseWorkflows($workflows);
|
||||
|
|
|
@ -160,9 +160,9 @@ try {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorStorageManagementWorkflow')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
$patches = PhabricatorSQLPatchList::buildAllPatches();
|
||||
|
||||
|
|
|
@ -190,11 +190,10 @@ try {
|
|||
$user->getUsername()));
|
||||
}
|
||||
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
$workflows = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorSSHWorkflow')
|
||||
->loadObjects();
|
||||
|
||||
$workflow_names = mpull($workflows, 'getName', 'getName');
|
||||
->setUniqueMethod('getName')
|
||||
->execute();
|
||||
|
||||
if (!$original_argv) {
|
||||
throw new Exception(
|
||||
|
@ -210,7 +209,7 @@ try {
|
|||
$user->getUsername(),
|
||||
'git clone',
|
||||
'hg push',
|
||||
implode(', ', $workflow_names)));
|
||||
implode(', ', array_keys($workflows))));
|
||||
}
|
||||
|
||||
$log_argv = implode(' ', $original_argv);
|
||||
|
@ -231,7 +230,7 @@ try {
|
|||
|
||||
$parsed_args = new PhutilArgumentParser($parseable_argv);
|
||||
|
||||
if (empty($workflow_names[$command])) {
|
||||
if (empty($workflows[$command])) {
|
||||
throw new Exception(pht('Invalid command.'));
|
||||
}
|
||||
|
||||
|
|
|
@ -378,7 +378,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialFieldParseException' => 'applications/differential/exception/DifferentialFieldParseException.php',
|
||||
'DifferentialFieldValidationException' => 'applications/differential/exception/DifferentialFieldValidationException.php',
|
||||
'DifferentialFindConduitAPIMethod' => 'applications/differential/conduit/DifferentialFindConduitAPIMethod.php',
|
||||
'DifferentialFinishPostponedLintersConduitAPIMethod' => 'applications/differential/conduit/DifferentialFinishPostponedLintersConduitAPIMethod.php',
|
||||
'DifferentialGetAllDiffsConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetAllDiffsConduitAPIMethod.php',
|
||||
'DifferentialGetCommitMessageConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php',
|
||||
'DifferentialGetCommitPathsConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetCommitPathsConduitAPIMethod.php',
|
||||
|
@ -495,7 +494,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialUnitStatus' => 'applications/differential/constants/DifferentialUnitStatus.php',
|
||||
'DifferentialUnitTestResult' => 'applications/differential/constants/DifferentialUnitTestResult.php',
|
||||
'DifferentialUpdateRevisionConduitAPIMethod' => 'applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php',
|
||||
'DifferentialUpdateUnitResultsConduitAPIMethod' => 'applications/differential/conduit/DifferentialUpdateUnitResultsConduitAPIMethod.php',
|
||||
'DifferentialViewPolicyField' => 'applications/differential/customfield/DifferentialViewPolicyField.php',
|
||||
'DiffusionAuditorDatasource' => 'applications/diffusion/typeahead/DiffusionAuditorDatasource.php',
|
||||
'DiffusionAuditorsAddAuditorsHeraldAction' => 'applications/diffusion/herald/DiffusionAuditorsAddAuditorsHeraldAction.php',
|
||||
|
@ -1063,6 +1061,7 @@ phutil_register_library_map(array(
|
|||
'HeraldNotifyActionGroup' => 'applications/herald/action/HeraldNotifyActionGroup.php',
|
||||
'HeraldObjectTranscript' => 'applications/herald/storage/transcript/HeraldObjectTranscript.php',
|
||||
'HeraldPholioMockAdapter' => 'applications/pholio/herald/HeraldPholioMockAdapter.php',
|
||||
'HeraldPonderQuestionAdapter' => 'applications/ponder/herald/HeraldPonderQuestionAdapter.php',
|
||||
'HeraldPreCommitAdapter' => 'applications/diffusion/herald/HeraldPreCommitAdapter.php',
|
||||
'HeraldPreCommitContentAdapter' => 'applications/diffusion/herald/HeraldPreCommitContentAdapter.php',
|
||||
'HeraldPreCommitRefAdapter' => 'applications/diffusion/herald/HeraldPreCommitRefAdapter.php',
|
||||
|
@ -1249,7 +1248,6 @@ phutil_register_library_map(array(
|
|||
'ManiphestTransactionSaveController' => 'applications/maniphest/controller/ManiphestTransactionSaveController.php',
|
||||
'ManiphestUpdateConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php',
|
||||
'ManiphestView' => 'applications/maniphest/view/ManiphestView.php',
|
||||
'MetaMTAConstants' => 'applications/metamta/constants/MetaMTAConstants.php',
|
||||
'MetaMTAEmailTransactionCommand' => 'applications/metamta/command/MetaMTAEmailTransactionCommand.php',
|
||||
'MetaMTAEmailTransactionCommandTestCase' => 'applications/metamta/command/__tests__/MetaMTAEmailTransactionCommandTestCase.php',
|
||||
'MetaMTAMailReceivedGarbageCollector' => 'applications/metamta/garbagecollector/MetaMTAMailReceivedGarbageCollector.php',
|
||||
|
@ -1407,6 +1405,7 @@ phutil_register_library_map(array(
|
|||
'PHUITimelineEventView' => 'view/phui/PHUITimelineEventView.php',
|
||||
'PHUITimelineExample' => 'applications/uiexample/examples/PHUITimelineExample.php',
|
||||
'PHUITimelineView' => 'view/phui/PHUITimelineView.php',
|
||||
'PHUITwoColumnView' => 'view/phui/PHUITwoColumnView.php',
|
||||
'PHUITypeaheadExample' => 'applications/uiexample/examples/PHUITypeaheadExample.php',
|
||||
'PHUIWorkboardView' => 'view/phui/PHUIWorkboardView.php',
|
||||
'PHUIWorkpanelView' => 'view/phui/PHUIWorkpanelView.php',
|
||||
|
@ -2258,6 +2257,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorMailManagementShowOutboundWorkflow' => 'applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php',
|
||||
'PhabricatorMailManagementVolumeWorkflow' => 'applications/metamta/management/PhabricatorMailManagementVolumeWorkflow.php',
|
||||
'PhabricatorMailManagementWorkflow' => 'applications/metamta/management/PhabricatorMailManagementWorkflow.php',
|
||||
'PhabricatorMailOutboundStatus' => 'applications/metamta/constants/PhabricatorMailOutboundStatus.php',
|
||||
'PhabricatorMailReceiver' => 'applications/metamta/receiver/PhabricatorMailReceiver.php',
|
||||
'PhabricatorMailReceiverTestCase' => 'applications/metamta/receiver/__tests__/PhabricatorMailReceiverTestCase.php',
|
||||
'PhabricatorMailReplyHandler' => 'applications/metamta/replyhandler/PhabricatorMailReplyHandler.php',
|
||||
|
@ -3395,20 +3395,23 @@ phutil_register_library_map(array(
|
|||
'PonderAnswerPHIDType' => 'applications/ponder/phid/PonderAnswerPHIDType.php',
|
||||
'PonderAnswerQuery' => 'applications/ponder/query/PonderAnswerQuery.php',
|
||||
'PonderAnswerSaveController' => 'applications/ponder/controller/PonderAnswerSaveController.php',
|
||||
'PonderAnswerStatus' => 'applications/ponder/constants/PonderAnswerStatus.php',
|
||||
'PonderAnswerTransaction' => 'applications/ponder/storage/PonderAnswerTransaction.php',
|
||||
'PonderAnswerTransactionComment' => 'applications/ponder/storage/PonderAnswerTransactionComment.php',
|
||||
'PonderAnswerTransactionQuery' => 'applications/ponder/query/PonderAnswerTransactionQuery.php',
|
||||
'PonderAnswerView' => 'applications/ponder/view/PonderAnswerView.php',
|
||||
'PonderConstants' => 'applications/ponder/constants/PonderConstants.php',
|
||||
'PonderController' => 'applications/ponder/controller/PonderController.php',
|
||||
'PonderDAO' => 'applications/ponder/storage/PonderDAO.php',
|
||||
'PonderDefaultViewCapability' => 'applications/ponder/capability/PonderDefaultViewCapability.php',
|
||||
'PonderEditor' => 'applications/ponder/editor/PonderEditor.php',
|
||||
'PonderFooterView' => 'applications/ponder/view/PonderFooterView.php',
|
||||
'PonderHelpfulSaveController' => 'applications/ponder/controller/PonderHelpfulSaveController.php',
|
||||
'PonderModerateCapability' => 'applications/ponder/capability/PonderModerateCapability.php',
|
||||
'PonderQuestion' => 'applications/ponder/storage/PonderQuestion.php',
|
||||
'PonderQuestionCommentController' => 'applications/ponder/controller/PonderQuestionCommentController.php',
|
||||
'PonderQuestionDefaultEditCapability' => 'applications/ponder/capability/PonderQuestionDefaultEditCapability.php',
|
||||
'PonderQuestionDefaultViewCapability' => 'applications/ponder/capability/PonderQuestionDefaultViewCapability.php',
|
||||
'PonderQuestionEditController' => 'applications/ponder/controller/PonderQuestionEditController.php',
|
||||
'PonderQuestionEditor' => 'applications/ponder/editor/PonderQuestionEditor.php',
|
||||
'PonderQuestionHasVotingUserEdgeType' => 'applications/ponder/edge/PonderQuestionHasVotingUserEdgeType.php',
|
||||
'PonderQuestionHistoryController' => 'applications/ponder/controller/PonderQuestionHistoryController.php',
|
||||
'PonderQuestionListController' => 'applications/ponder/controller/PonderQuestionListController.php',
|
||||
'PonderQuestionMailReceiver' => 'applications/ponder/mail/PonderQuestionMailReceiver.php',
|
||||
|
@ -3427,12 +3430,9 @@ phutil_register_library_map(array(
|
|||
'PonderSearchIndexer' => 'applications/ponder/search/PonderSearchIndexer.php',
|
||||
'PonderTransactionFeedStory' => 'applications/ponder/feed/PonderTransactionFeedStory.php',
|
||||
'PonderVotableInterface' => 'applications/ponder/storage/PonderVotableInterface.php',
|
||||
'PonderVotableView' => 'applications/ponder/view/PonderVotableView.php',
|
||||
'PonderVote' => 'applications/ponder/constants/PonderVote.php',
|
||||
'PonderVoteEditor' => 'applications/ponder/editor/PonderVoteEditor.php',
|
||||
'PonderVoteSaveController' => 'applications/ponder/controller/PonderVoteSaveController.php',
|
||||
'PonderVotingUserHasAnswerEdgeType' => 'applications/ponder/edge/PonderVotingUserHasAnswerEdgeType.php',
|
||||
'PonderVotingUserHasQuestionEdgeType' => 'applications/ponder/edge/PonderVotingUserHasQuestionEdgeType.php',
|
||||
'ProjectAddProjectsEmailCommand' => 'applications/project/command/ProjectAddProjectsEmailCommand.php',
|
||||
'ProjectBoardTaskCard' => 'applications/project/view/ProjectBoardTaskCard.php',
|
||||
'ProjectCanLockProjectsCapability' => 'applications/project/capability/ProjectCanLockProjectsCapability.php',
|
||||
|
@ -4001,7 +4001,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialFieldParseException' => 'Exception',
|
||||
'DifferentialFieldValidationException' => 'Exception',
|
||||
'DifferentialFindConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialFinishPostponedLintersConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialGetAllDiffsConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialGetCommitMessageConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialGetCommitPathsConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
|
@ -4138,7 +4137,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialUnitStatus' => 'Phobject',
|
||||
'DifferentialUnitTestResult' => 'Phobject',
|
||||
'DifferentialUpdateRevisionConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialUpdateUnitResultsConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
'DifferentialViewPolicyField' => 'DifferentialCoreCustomField',
|
||||
'DiffusionAuditorDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'DiffusionAuditorsAddAuditorsHeraldAction' => 'DiffusionAuditorsHeraldAction',
|
||||
|
@ -4789,6 +4787,7 @@ phutil_register_library_map(array(
|
|||
'HeraldNotifyActionGroup' => 'HeraldActionGroup',
|
||||
'HeraldObjectTranscript' => 'Phobject',
|
||||
'HeraldPholioMockAdapter' => 'HeraldAdapter',
|
||||
'HeraldPonderQuestionAdapter' => 'HeraldAdapter',
|
||||
'HeraldPreCommitAdapter' => 'HeraldAdapter',
|
||||
'HeraldPreCommitContentAdapter' => 'HeraldPreCommitAdapter',
|
||||
'HeraldPreCommitRefAdapter' => 'HeraldPreCommitAdapter',
|
||||
|
@ -5014,12 +5013,11 @@ phutil_register_library_map(array(
|
|||
'ManiphestTransactionSaveController' => 'ManiphestController',
|
||||
'ManiphestUpdateConduitAPIMethod' => 'ManiphestConduitAPIMethod',
|
||||
'ManiphestView' => 'AphrontView',
|
||||
'MetaMTAConstants' => 'Phobject',
|
||||
'MetaMTAEmailTransactionCommand' => 'Phobject',
|
||||
'MetaMTAEmailTransactionCommandTestCase' => 'PhabricatorTestCase',
|
||||
'MetaMTAMailReceivedGarbageCollector' => 'PhabricatorGarbageCollector',
|
||||
'MetaMTAMailSentGarbageCollector' => 'PhabricatorGarbageCollector',
|
||||
'MetaMTAReceivedMailStatus' => 'MetaMTAConstants',
|
||||
'MetaMTAReceivedMailStatus' => 'Phobject',
|
||||
'MultimeterContext' => 'MultimeterDimension',
|
||||
'MultimeterControl' => 'Phobject',
|
||||
'MultimeterController' => 'PhabricatorController',
|
||||
|
@ -5188,6 +5186,7 @@ phutil_register_library_map(array(
|
|||
'PHUITimelineEventView' => 'AphrontView',
|
||||
'PHUITimelineExample' => 'PhabricatorUIExample',
|
||||
'PHUITimelineView' => 'AphrontView',
|
||||
'PHUITwoColumnView' => 'AphrontTagView',
|
||||
'PHUITypeaheadExample' => 'PhabricatorUIExample',
|
||||
'PHUIWorkboardView' => 'AphrontTagView',
|
||||
'PHUIWorkpanelView' => 'AphrontTagView',
|
||||
|
@ -6183,6 +6182,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorMailManagementShowOutboundWorkflow' => 'PhabricatorMailManagementWorkflow',
|
||||
'PhabricatorMailManagementVolumeWorkflow' => 'PhabricatorMailManagementWorkflow',
|
||||
'PhabricatorMailManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||
'PhabricatorMailOutboundStatus' => 'Phobject',
|
||||
'PhabricatorMailReceiver' => 'Phobject',
|
||||
'PhabricatorMailReceiverTestCase' => 'PhabricatorTestCase',
|
||||
'PhabricatorMailReplyHandler' => 'Phobject',
|
||||
|
@ -7572,7 +7572,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPolicyInterface',
|
||||
'PhabricatorFlaggableInterface',
|
||||
'PhabricatorSubscribableInterface',
|
||||
'PhabricatorTokenReceiverInterface',
|
||||
'PhabricatorDestructibleInterface',
|
||||
),
|
||||
'PonderAnswerCommentController' => 'PonderController',
|
||||
|
@ -7583,18 +7582,23 @@ phutil_register_library_map(array(
|
|||
'PonderAnswerPHIDType' => 'PhabricatorPHIDType',
|
||||
'PonderAnswerQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PonderAnswerSaveController' => 'PonderController',
|
||||
'PonderAnswerStatus' => 'PonderConstants',
|
||||
'PonderAnswerTransaction' => 'PhabricatorApplicationTransaction',
|
||||
'PonderAnswerTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
||||
'PonderAnswerTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||
'PonderAnswerView' => 'AphrontTagView',
|
||||
'PonderConstants' => 'Phobject',
|
||||
'PonderController' => 'PhabricatorController',
|
||||
'PonderDAO' => 'PhabricatorLiskDAO',
|
||||
'PonderDefaultViewCapability' => 'PhabricatorPolicyCapability',
|
||||
'PonderEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||
'PonderFooterView' => 'AphrontTagView',
|
||||
'PonderHelpfulSaveController' => 'PonderController',
|
||||
'PonderModerateCapability' => 'PhabricatorPolicyCapability',
|
||||
'PonderQuestion' => array(
|
||||
'PonderDAO',
|
||||
'PhabricatorApplicationTransactionInterface',
|
||||
'PhabricatorMarkupInterface',
|
||||
'PonderVotableInterface',
|
||||
'PhabricatorSubscribableInterface',
|
||||
'PhabricatorFlaggableInterface',
|
||||
'PhabricatorPolicyInterface',
|
||||
|
@ -7604,11 +7608,8 @@ phutil_register_library_map(array(
|
|||
'PhabricatorSpacesInterface',
|
||||
),
|
||||
'PonderQuestionCommentController' => 'PonderController',
|
||||
'PonderQuestionDefaultEditCapability' => 'PhabricatorPolicyCapability',
|
||||
'PonderQuestionDefaultViewCapability' => 'PhabricatorPolicyCapability',
|
||||
'PonderQuestionEditController' => 'PonderController',
|
||||
'PonderQuestionEditor' => 'PonderEditor',
|
||||
'PonderQuestionHasVotingUserEdgeType' => 'PhabricatorEdgeType',
|
||||
'PonderQuestionHistoryController' => 'PonderController',
|
||||
'PonderQuestionListController' => 'PonderController',
|
||||
'PonderQuestionMailReceiver' => 'PhabricatorObjectMailReceiver',
|
||||
|
@ -7626,12 +7627,9 @@ phutil_register_library_map(array(
|
|||
'PonderSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||
'PonderSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
|
||||
'PonderTransactionFeedStory' => 'PhabricatorApplicationTransactionFeedStory',
|
||||
'PonderVotableView' => 'AphrontView',
|
||||
'PonderVote' => 'PonderConstants',
|
||||
'PonderVoteEditor' => 'PhabricatorEditor',
|
||||
'PonderVoteSaveController' => 'PonderController',
|
||||
'PonderVotingUserHasAnswerEdgeType' => 'PhabricatorEdgeType',
|
||||
'PonderVotingUserHasQuestionEdgeType' => 'PhabricatorEdgeType',
|
||||
'ProjectAddProjectsEmailCommand' => 'MetaMTAEmailTransactionCommand',
|
||||
'ProjectBoardTaskCard' => 'Phobject',
|
||||
'ProjectCanLockProjectsCapability' => 'PhabricatorPolicyCapability',
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
final class PhabricatorConduitTestCase extends PhabricatorTestCase {
|
||||
|
||||
public function testConduitMethods() {
|
||||
$methods = id(new PhutilSymbolLoader())
|
||||
$methods = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('ConduitAPIMethod')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
// We're just looking for a side effect of ConduitCall construction
|
||||
// here: it will throw if any methods define reserved parameter names.
|
||||
|
|
|
@ -246,13 +246,14 @@ abstract class AphrontApplicationConfiguration extends Phobject {
|
|||
if ($response instanceof AphrontWebpageResponse) {
|
||||
echo phutil_tag(
|
||||
'div',
|
||||
array('style' =>
|
||||
'background: #eeddff;'.
|
||||
'white-space: pre-wrap;'.
|
||||
'z-index: 200000;'.
|
||||
'position: relative;'.
|
||||
'padding: 8px;'.
|
||||
'font-family: monospace',
|
||||
array(
|
||||
'style' =>
|
||||
'background: #eeddff;'.
|
||||
'white-space: pre-wrap;'.
|
||||
'z-index: 200000;'.
|
||||
'position: relative;'.
|
||||
'padding: 8px;'.
|
||||
'font-family: monospace',
|
||||
),
|
||||
$unexpected_output);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ final class PhabricatorBadgesTransaction
|
|||
const TYPE_STATUS = 'badges:status';
|
||||
const TYPE_FLAVOR = 'badges:flavor';
|
||||
|
||||
const MAILTAG_NAME = 'badges:name';
|
||||
const MAILTAG_DETAILS = 'badges:details';
|
||||
const MAILTAG_COMMENT = 'badges:comment';
|
||||
const MAILTAG_OTHER = 'badges:other';
|
||||
|
|
|
@ -17,14 +17,12 @@ final class CelerityPhabricatorResourceController
|
|||
return CelerityResourceMap::getNamedInstance($this->library);
|
||||
}
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->path = $data['path'];
|
||||
$this->hash = $data['hash'];
|
||||
$this->library = $data['library'];
|
||||
$this->postprocessorKey = idx($data, 'postprocessor');
|
||||
}
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$this->path = $request->getURIData('path');
|
||||
$this->hash = $request->getURIData('hash');
|
||||
$this->library = $request->getURIData('library');
|
||||
$this->postprocessorKey = $request->getURIData('postprocessor');
|
||||
|
||||
public function processRequest() {
|
||||
// Check that the resource library exists before trying to serve resources
|
||||
// from it.
|
||||
try {
|
||||
|
|
|
@ -139,34 +139,10 @@ abstract class ConduitAPIMethod
|
|||
}
|
||||
|
||||
public static function loadAllConduitMethods() {
|
||||
static $method_map = null;
|
||||
|
||||
if ($method_map === null) {
|
||||
$methods = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass(__CLASS__)
|
||||
->loadObjects();
|
||||
|
||||
foreach ($methods as $method) {
|
||||
$name = $method->getAPIMethodName();
|
||||
|
||||
if (empty($method_map[$name])) {
|
||||
$method_map[$name] = $method;
|
||||
continue;
|
||||
}
|
||||
|
||||
$orig_class = get_class($method_map[$name]);
|
||||
$this_class = get_class($method);
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Two Conduit API method classes (%s, %s) both have the same '.
|
||||
'method name (%s). API methods must have unique method names.',
|
||||
$orig_class,
|
||||
$this_class,
|
||||
$name));
|
||||
}
|
||||
}
|
||||
|
||||
return $method_map;
|
||||
return id(new PhutilClassMapQuery())
|
||||
->setAncestorClass(__CLASS__)
|
||||
->setUniqueMethod('getAPIMethodName')
|
||||
->execute();
|
||||
}
|
||||
|
||||
public static function getConduitMethod($method_name) {
|
||||
|
|
|
@ -19,10 +19,9 @@ final class ConduitQueryConduitAPIMethod extends ConduitAPIMethod {
|
|||
}
|
||||
|
||||
protected function execute(ConduitAPIRequest $request) {
|
||||
$classes = id(new PhutilSymbolLoader())
|
||||
$classes = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('ConduitAPIMethod')
|
||||
->setType('class')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
$names_to_params = array();
|
||||
foreach ($classes as $class) {
|
||||
|
|
|
@ -47,14 +47,10 @@ final class PhabricatorConduitMethodQuery
|
|||
}
|
||||
|
||||
private function getAllMethods() {
|
||||
static $methods;
|
||||
if ($methods === null) {
|
||||
$methods = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass('ConduitAPIMethod')
|
||||
->loadObjects();
|
||||
$methods = msort($methods, 'getSortOrder');
|
||||
}
|
||||
return $methods;
|
||||
return id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('ConduitAPIMethod')
|
||||
->setSortMethod('getSortOrder')
|
||||
->execute();
|
||||
}
|
||||
|
||||
private function filterMethods(array $methods) {
|
||||
|
|
|
@ -9,9 +9,9 @@ final class PhabricatorConfigCoreSchemaSpec
|
|||
public function buildSchemata() {
|
||||
// Build all Lisk table schemata.
|
||||
|
||||
$lisk_objects = id(new PhutilSymbolLoader())
|
||||
$lisk_objects = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorLiskDAO')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
$counters = array();
|
||||
foreach ($lisk_objects as $object) {
|
||||
|
|
|
@ -155,9 +155,9 @@ final class PhabricatorConfigSchemaQuery extends Phobject {
|
|||
$databases = $this->getDatabaseNames();
|
||||
$info = $this->getAPI()->getCharsetInfo();
|
||||
|
||||
$specs = id(new PhutilSymbolLoader())
|
||||
$specs = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorConfigSchemaSpec')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
$server_schema = new PhabricatorConfigServerSchema();
|
||||
foreach ($specs as $spec) {
|
||||
|
|
|
@ -7,9 +7,10 @@ abstract class ConpherenceTestCase extends PhabricatorTestCase {
|
|||
ConpherenceThread $conpherence,
|
||||
array $participant_phids) {
|
||||
|
||||
$xactions = array(id(new ConpherenceTransaction())
|
||||
->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS)
|
||||
->setNewValue(array('+' => $participant_phids)),
|
||||
$xactions = array(
|
||||
id(new ConpherenceTransaction())
|
||||
->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS)
|
||||
->setNewValue(array('+' => $participant_phids)),
|
||||
);
|
||||
$editor = id(new ConpherenceEditor())
|
||||
->setActor($actor)
|
||||
|
@ -23,9 +24,10 @@ abstract class ConpherenceTestCase extends PhabricatorTestCase {
|
|||
ConpherenceThread $conpherence,
|
||||
array $participant_phids) {
|
||||
|
||||
$xactions = array(id(new ConpherenceTransaction())
|
||||
->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS)
|
||||
->setNewValue(array('-' => $participant_phids)),
|
||||
$xactions = array(
|
||||
id(new ConpherenceTransaction())
|
||||
->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS)
|
||||
->setNewValue(array('-' => $participant_phids)),
|
||||
);
|
||||
$editor = id(new ConpherenceEditor())
|
||||
->setActor($actor)
|
||||
|
|
|
@ -6,19 +6,13 @@ final class DarkConsoleCore extends Phobject {
|
|||
const STORAGE_VERSION = 1;
|
||||
|
||||
public function __construct() {
|
||||
$symbols = id(new PhutilSymbolLoader())
|
||||
->setType('class')
|
||||
$this->plugins = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('DarkConsolePlugin')
|
||||
->selectAndLoadSymbols();
|
||||
->execute();
|
||||
|
||||
foreach ($symbols as $symbol) {
|
||||
$plugin = newv($symbol['name'], array());
|
||||
if (!$plugin->shouldStartup()) {
|
||||
continue;
|
||||
}
|
||||
foreach ($this->plugins as $plugin) {
|
||||
$plugin->setConsoleCore($this);
|
||||
$plugin->didStartup();
|
||||
$this->plugins[$symbol['name']] = $plugin;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,10 +62,6 @@ abstract class DarkConsolePlugin extends Phobject {
|
|||
return $this->getRequest()->getRequestURI();
|
||||
}
|
||||
|
||||
public function shouldStartup() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function didStartup() {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -3,16 +3,10 @@
|
|||
final class PhabricatorDaemonLogEventViewController
|
||||
extends PhabricatorDaemonController {
|
||||
|
||||
private $id;
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$id = $request->getURIData('id');
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->id = $data['id'];
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
|
||||
$event = id(new PhabricatorDaemonLogEvent())->load($this->id);
|
||||
$event = id(new PhabricatorDaemonLogEvent())->load($id);
|
||||
if (!$event) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
final class PhabricatorDaemonLogListController
|
||||
extends PhabricatorDaemonController {
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $request->getViewer();
|
||||
|
||||
$pager = new AphrontCursorPagerView();
|
||||
$pager->readFromRequest($request);
|
||||
|
|
|
@ -3,19 +3,13 @@
|
|||
final class PhabricatorDaemonLogViewController
|
||||
extends PhabricatorDaemonController {
|
||||
|
||||
private $id;
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->id = $data['id'];
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $request->getViewer();
|
||||
$id = $request->getURIData('id');
|
||||
|
||||
$log = id(new PhabricatorDaemonLogQuery())
|
||||
->setViewer($user)
|
||||
->withIDs(array($this->id))
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($id))
|
||||
->setAllowStatusWrites(true)
|
||||
->executeOne();
|
||||
if (!$log) {
|
||||
|
@ -76,7 +70,7 @@ final class PhabricatorDaemonLogViewController
|
|||
$properties = $this->buildPropertyListView($log);
|
||||
|
||||
$event_view = id(new PhabricatorDaemonLogEventsView())
|
||||
->setUser($user)
|
||||
->setUser($viewer)
|
||||
->setEvents($events);
|
||||
|
||||
$event_panel = new PHUIObjectBoxView();
|
||||
|
|
|
@ -3,20 +3,14 @@
|
|||
final class PhabricatorWorkerTaskDetailController
|
||||
extends PhabricatorDaemonController {
|
||||
|
||||
private $id;
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $request->getViewer();
|
||||
$id = $request->getURIData('id');
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->id = $data['id'];
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
$task = id(new PhabricatorWorkerActiveTask())->load($this->id);
|
||||
$task = id(new PhabricatorWorkerActiveTask())->load($id);
|
||||
if (!$task) {
|
||||
$tasks = id(new PhabricatorWorkerArchiveTaskQuery())
|
||||
->withIDs(array($this->id))
|
||||
->withIDs(array($id))
|
||||
->execute();
|
||||
$task = reset($tasks);
|
||||
}
|
||||
|
@ -155,9 +149,9 @@ final class PhabricatorWorkerTaskDetailController
|
|||
$worker = $task->getWorkerInstance();
|
||||
$data = $worker->renderForDisplay($viewer);
|
||||
|
||||
$view->addProperty(
|
||||
pht('Data'),
|
||||
$data);
|
||||
if ($data !== null) {
|
||||
$view->addProperty(pht('Data'), $data);
|
||||
}
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
|
@ -6,8 +6,7 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
private $runDaemonsAsUser = null;
|
||||
|
||||
final protected function loadAvailableDaemonClasses() {
|
||||
$loader = new PhutilSymbolLoader();
|
||||
return $loader
|
||||
return id(new PhutilSymbolLoader())
|
||||
->setAncestorClass('PhutilDaemon')
|
||||
->setConcreteOnly(true)
|
||||
->selectSymbolsWithoutLoading();
|
||||
|
|
|
@ -3,16 +3,10 @@
|
|||
final class PhabricatorDashboardManageController
|
||||
extends PhabricatorDashboardController {
|
||||
|
||||
private $id;
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $request->getViewer();
|
||||
$id = $request->getURIData('id');
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->id = $data['id'];
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
$id = $this->id;
|
||||
$dashboard_uri = $this->getApplicationURI('view/'.$id.'/');
|
||||
|
||||
// TODO: This UI should drop a lot of capabilities if the user can't
|
||||
|
@ -21,7 +15,7 @@ final class PhabricatorDashboardManageController
|
|||
|
||||
$dashboard = id(new PhabricatorDashboardQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($this->id))
|
||||
->withIDs(array($id))
|
||||
->needPanels(true)
|
||||
->executeOne();
|
||||
if (!$dashboard) {
|
||||
|
|
|
@ -12,11 +12,11 @@ final class PhabricatorDashboardPanelSearchApplicationCustomField
|
|||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
|
||||
$engines = id(new PhutilSymbolLoader())
|
||||
$engines = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorApplicationSearchEngine')
|
||||
->loadObjects();
|
||||
$engines = mfilter($engines, 'canUseInPanelContext');
|
||||
->setFilterMethod('canUseInPanelContext')
|
||||
->execute();
|
||||
|
||||
$all_apps = id(new PhabricatorApplicationQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->withUnlisted(false)
|
||||
|
|
|
@ -12,11 +12,10 @@ final class PhabricatorDashboardPanelSearchQueryCustomField
|
|||
}
|
||||
|
||||
public function renderEditControl(array $handles) {
|
||||
|
||||
$engines = id(new PhutilSymbolLoader())
|
||||
$engines = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorApplicationSearchEngine')
|
||||
->loadObjects();
|
||||
$engines = mfilter($engines, 'canUseInPanelContext');
|
||||
->setFilterMethod('canUseInPanelContext')
|
||||
->execute();
|
||||
|
||||
$value = $this->getFieldValue();
|
||||
|
||||
|
|
|
@ -143,9 +143,10 @@ final class DifferentialCreateDiffConduitAPIMethod
|
|||
'unitStatus' => $unit_status,
|
||||
);
|
||||
|
||||
$xactions = array(id(new DifferentialTransaction())
|
||||
->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE)
|
||||
->setNewValue($diff_data_dict),
|
||||
$xactions = array(
|
||||
id(new DifferentialTransaction())
|
||||
->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE)
|
||||
->setNewValue($diff_data_dict),
|
||||
);
|
||||
|
||||
id(new DifferentialDiffEditor())
|
||||
|
|
|
@ -51,9 +51,10 @@ final class DifferentialCreateRawDiffConduitAPIMethod
|
|||
'unitStatus' => DifferentialUnitStatus::UNIT_SKIP,
|
||||
);
|
||||
|
||||
$xactions = array(id(new DifferentialTransaction())
|
||||
->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE)
|
||||
->setNewValue($diff_data_dict),
|
||||
$xactions = array(
|
||||
id(new DifferentialTransaction())
|
||||
->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE)
|
||||
->setNewValue($diff_data_dict),
|
||||
);
|
||||
|
||||
if ($request->getValue('viewPolicy')) {
|
||||
|
|
|
@ -1,118 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialFinishPostponedLintersConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.finishpostponedlinters';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht(
|
||||
'Update diff with new lint messages and mark postponed '.
|
||||
'linters as finished.');
|
||||
}
|
||||
|
||||
protected function defineParamTypes() {
|
||||
return array(
|
||||
'diffID' => 'required diffID',
|
||||
'linters' => 'required dict',
|
||||
);
|
||||
}
|
||||
|
||||
protected function defineReturnType() {
|
||||
return 'void';
|
||||
}
|
||||
|
||||
protected function defineErrorTypes() {
|
||||
return array(
|
||||
'ERR-BAD-DIFF' => pht('Bad diff ID.'),
|
||||
'ERR-BAD-LINTER' => pht('No postponed linter by the given name.'),
|
||||
'ERR-NO-LINT' => pht('No postponed lint field available in diff.'),
|
||||
);
|
||||
}
|
||||
|
||||
protected function execute(ConduitAPIRequest $request) {
|
||||
$diff_id = $request->getValue('diffID');
|
||||
$linter_map = $request->getValue('linters');
|
||||
|
||||
$diff = id(new DifferentialDiffQuery())
|
||||
->setViewer($request->getUser())
|
||||
->withIDs(array($diff_id))
|
||||
->executeOne();
|
||||
if (!$diff) {
|
||||
throw new ConduitException('ERR-BAD-DIFF');
|
||||
}
|
||||
|
||||
// Extract the finished linters and messages from the linter map.
|
||||
$finished_linters = array_keys($linter_map);
|
||||
$new_messages = array();
|
||||
foreach ($linter_map as $linter => $messages) {
|
||||
$new_messages = array_merge($new_messages, $messages);
|
||||
}
|
||||
|
||||
// Load the postponed linters attached to this diff.
|
||||
$postponed_linters_property = id(
|
||||
new DifferentialDiffProperty())->loadOneWhere(
|
||||
'diffID = %d AND name = %s',
|
||||
$diff_id,
|
||||
'arc:lint-postponed');
|
||||
if ($postponed_linters_property) {
|
||||
$postponed_linters = $postponed_linters_property->getData();
|
||||
} else {
|
||||
$postponed_linters = array();
|
||||
}
|
||||
|
||||
foreach ($finished_linters as $linter) {
|
||||
if (!in_array($linter, $postponed_linters)) {
|
||||
throw new ConduitException('ERR-BAD-LINTER');
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($postponed_linters as $idx => $linter) {
|
||||
if (in_array($linter, $finished_linters)) {
|
||||
unset($postponed_linters[$idx]);
|
||||
}
|
||||
}
|
||||
|
||||
// Load the lint messages currenty attached to the diff. If this
|
||||
// diff property doesn't exist, create it.
|
||||
$messages_property = id(new DifferentialDiffProperty())->loadOneWhere(
|
||||
'diffID = %d AND name = %s',
|
||||
$diff_id,
|
||||
'arc:lint');
|
||||
if ($messages_property) {
|
||||
$messages = $messages_property->getData();
|
||||
} else {
|
||||
$messages = array();
|
||||
}
|
||||
|
||||
// Add new lint messages, removing duplicates.
|
||||
foreach ($new_messages as $new_message) {
|
||||
if (!in_array($new_message, $messages)) {
|
||||
$messages[] = $new_message;
|
||||
}
|
||||
}
|
||||
|
||||
// Use setdiffproperty to update the postponed linters and messages,
|
||||
// as these will also update the lint status correctly.
|
||||
$call = new ConduitCall(
|
||||
'differential.setdiffproperty',
|
||||
array(
|
||||
'diff_id' => $diff_id,
|
||||
'name' => 'arc:lint',
|
||||
'data' => json_encode($messages),
|
||||
));
|
||||
$call->setUser($request->getUser());
|
||||
$call->execute();
|
||||
$call = new ConduitCall(
|
||||
'differential.setdiffproperty',
|
||||
array(
|
||||
'diff_id' => $diff_id,
|
||||
'name' => 'arc:lint-postponed',
|
||||
'data' => json_encode($postponed_linters),
|
||||
));
|
||||
$call->setUser($request->getUser());
|
||||
$call->execute();
|
||||
}
|
||||
}
|
|
@ -29,72 +29,12 @@ final class DifferentialSetDiffPropertyConduitAPIMethod
|
|||
);
|
||||
}
|
||||
|
||||
private static function updateLintStatus($diff_id) {
|
||||
|
||||
$diff = id(new DifferentialDiff())->load($diff_id);
|
||||
if (!$diff) {
|
||||
throw new ConduitException('ERR_NOT_FOUND');
|
||||
}
|
||||
|
||||
// Load the postponed linters attached to this diff.
|
||||
$postponed_linters_property = id(
|
||||
new DifferentialDiffProperty())->loadOneWhere(
|
||||
'diffID = %d AND name = %s',
|
||||
$diff_id,
|
||||
'arc:lint-postponed');
|
||||
if ($postponed_linters_property) {
|
||||
$postponed_linters = $postponed_linters_property->getData();
|
||||
} else {
|
||||
$postponed_linters = array();
|
||||
}
|
||||
|
||||
// Load the lint messages currenty attached to the diff
|
||||
$messages_property = id(new DifferentialDiffProperty())->loadOneWhere(
|
||||
'diffID = %d AND name = %s',
|
||||
$diff_id,
|
||||
'arc:lint');
|
||||
if ($messages_property) {
|
||||
$results = $messages_property->getData();
|
||||
} else {
|
||||
$results = array();
|
||||
}
|
||||
|
||||
$has_error = false;
|
||||
$has_warning = false;
|
||||
foreach ($results as $result) {
|
||||
if ($result['severity'] === ArcanistLintSeverity::SEVERITY_ERROR) {
|
||||
$has_error = true;
|
||||
break;
|
||||
} else if ($result['severity'] ===
|
||||
ArcanistLintSeverity::SEVERITY_WARNING) {
|
||||
$has_warning = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($has_error) {
|
||||
$diff->setLintStatus(DifferentialLintStatus::LINT_FAIL);
|
||||
} else if ($has_warning) {
|
||||
$diff->setLintStatus(DifferentialLintStatus::LINT_WARN);
|
||||
} else if (!empty($postponed_linters)) {
|
||||
$diff->setLintStatus(DifferentialLintStatus::LINT_POSTPONED);
|
||||
} else if ($diff->getLintStatus() != DifferentialLintStatus::LINT_SKIP) {
|
||||
$diff->setLintStatus(DifferentialLintStatus::LINT_OKAY);
|
||||
}
|
||||
$diff->save();
|
||||
}
|
||||
|
||||
protected function execute(ConduitAPIRequest $request) {
|
||||
$diff_id = $request->getValue('diff_id');
|
||||
$name = $request->getValue('name');
|
||||
$data = json_decode($request->getValue('data'), true);
|
||||
|
||||
self::updateDiffProperty($diff_id, $name, $data);
|
||||
|
||||
if ($name === 'arc:lint' || $name == 'arc:lint-postponed') {
|
||||
self::updateLintStatus($diff_id);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
private static function updateDiffProperty($diff_id, $name, $data) {
|
||||
|
|
|
@ -1,154 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialUpdateUnitResultsConduitAPIMethod
|
||||
extends DifferentialConduitAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'differential.updateunitresults';
|
||||
}
|
||||
|
||||
public function getMethodDescription() {
|
||||
return pht('Update arc unit results for a postponed test.');
|
||||
}
|
||||
|
||||
protected function defineParamTypes() {
|
||||
return array(
|
||||
'diff_id' => 'required diff_id',
|
||||
'file' => 'required string',
|
||||
'name' => 'required string',
|
||||
'link' => 'optional string',
|
||||
'result' => 'required string',
|
||||
'message' => 'required string',
|
||||
'coverage' => 'optional map<string, string>',
|
||||
);
|
||||
}
|
||||
|
||||
protected function defineReturnType() {
|
||||
return 'void';
|
||||
}
|
||||
|
||||
protected function defineErrorTypes() {
|
||||
return array(
|
||||
'ERR_BAD_DIFF' => pht('Bad diff ID.'),
|
||||
'ERR_NO_RESULTS' => pht('Could not find the postponed test'),
|
||||
);
|
||||
}
|
||||
|
||||
protected function execute(ConduitAPIRequest $request) {
|
||||
$diff_id = $request->getValue('diff_id');
|
||||
if (!$diff_id) {
|
||||
throw new ConduitException('ERR_BAD_DIFF');
|
||||
}
|
||||
|
||||
$file = $request->getValue('file');
|
||||
$name = $request->getValue('name');
|
||||
$link = $request->getValue('link');
|
||||
$message = $request->getValue('message');
|
||||
$result = $request->getValue('result');
|
||||
$coverage = $request->getValue('coverage', array());
|
||||
|
||||
$diff_property = id(new DifferentialDiffProperty())->loadOneWhere(
|
||||
'diffID = %d AND name = %s',
|
||||
$diff_id,
|
||||
'arc:unit');
|
||||
|
||||
if (!$diff_property) {
|
||||
throw new ConduitException('ERR_NO_RESULTS');
|
||||
}
|
||||
|
||||
$diff = id(new DifferentialDiffQuery())
|
||||
->setViewer($request->getUser())
|
||||
->withIDs(array($diff_id))
|
||||
->executeOne();
|
||||
|
||||
$unit_results = $diff_property->getData();
|
||||
$postponed_count = 0;
|
||||
$unit_status = null;
|
||||
|
||||
// If the test result already exists, then update it with
|
||||
// the new info.
|
||||
foreach ($unit_results as &$unit_result) {
|
||||
if ($unit_result['name'] === $name ||
|
||||
$unit_result['name'] === $file ||
|
||||
$unit_result['name'] === $diff->getSourcePath().$file) {
|
||||
$unit_result['name'] = $name;
|
||||
$unit_result['link'] = $link;
|
||||
$unit_result['file'] = $file;
|
||||
$unit_result['result'] = $result;
|
||||
$unit_result['userdata'] = $message;
|
||||
$unit_result['coverage'] = $coverage;
|
||||
$unit_status = $result;
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset($unit_result);
|
||||
|
||||
// If the test result doesn't exist, just add it.
|
||||
if (!$unit_status) {
|
||||
$unit_result = array();
|
||||
$unit_result['file'] = $file;
|
||||
$unit_result['name'] = $name;
|
||||
$unit_result['link'] = $link;
|
||||
$unit_result['result'] = $result;
|
||||
$unit_result['userdata'] = $message;
|
||||
$unit_result['coverage'] = $coverage;
|
||||
$unit_status = $result;
|
||||
$unit_results[] = $unit_result;
|
||||
}
|
||||
unset($unit_result);
|
||||
|
||||
$diff_property->setData($unit_results);
|
||||
$diff_property->save();
|
||||
|
||||
// Map external unit test status to internal overall diff status
|
||||
$status_codes =
|
||||
array(
|
||||
DifferentialUnitTestResult::RESULT_PASS =>
|
||||
DifferentialUnitStatus::UNIT_OKAY,
|
||||
DifferentialUnitTestResult::RESULT_UNSOUND =>
|
||||
DifferentialUnitStatus::UNIT_WARN,
|
||||
DifferentialUnitTestResult::RESULT_FAIL =>
|
||||
DifferentialUnitStatus::UNIT_FAIL,
|
||||
DifferentialUnitTestResult::RESULT_BROKEN =>
|
||||
DifferentialUnitStatus::UNIT_FAIL,
|
||||
DifferentialUnitTestResult::RESULT_SKIP =>
|
||||
DifferentialUnitStatus::UNIT_OKAY,
|
||||
DifferentialUnitTestResult::RESULT_POSTPONED =>
|
||||
DifferentialUnitStatus::UNIT_POSTPONED,
|
||||
);
|
||||
|
||||
// These are the relative priorities for the unit test results
|
||||
$status_codes_priority =
|
||||
array(
|
||||
DifferentialUnitStatus::UNIT_OKAY => 1,
|
||||
DifferentialUnitStatus::UNIT_WARN => 2,
|
||||
DifferentialUnitStatus::UNIT_POSTPONED => 3,
|
||||
DifferentialUnitStatus::UNIT_FAIL => 4,
|
||||
);
|
||||
|
||||
// Walk the now-current list of status codes to find the overall diff
|
||||
// status
|
||||
$final_diff_status = DifferentialUnitStatus::UNIT_NONE;
|
||||
foreach ($unit_results as $unit_result) {
|
||||
// Convert the text result into a diff unit status value
|
||||
$status_code = idx($status_codes,
|
||||
$unit_result['result'],
|
||||
DifferentialUnitStatus::UNIT_NONE);
|
||||
|
||||
// Convert the unit status into a relative value
|
||||
$diff_status_priority = idx($status_codes_priority, $status_code, 0);
|
||||
|
||||
// If the relative value of this result is "more bad" than previous
|
||||
// results, use it as the new final diff status
|
||||
if ($diff_status_priority > idx($status_codes_priority,
|
||||
$final_diff_status, 0)) {
|
||||
$final_diff_status = $status_code;
|
||||
}
|
||||
}
|
||||
|
||||
// Update our unit test result status with the final value
|
||||
$diff->setUnitStatus($final_diff_status);
|
||||
$diff->save();
|
||||
}
|
||||
|
||||
}
|
|
@ -127,29 +127,32 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
|||
$changeset = $choice;
|
||||
}
|
||||
|
||||
$coverage = null;
|
||||
if ($right && $right->getDiffID()) {
|
||||
$unit = id(new DifferentialDiffProperty())->loadOneWhere(
|
||||
'diffID = %d AND name = %s',
|
||||
$right->getDiffID(),
|
||||
'arc:unit');
|
||||
|
||||
if ($unit) {
|
||||
$coverage = array();
|
||||
foreach ($unit->getData() as $result) {
|
||||
$result_coverage = idx($result, 'coverage');
|
||||
if (!$result_coverage) {
|
||||
continue;
|
||||
}
|
||||
$file_coverage = idx($result_coverage, $right->getFileName());
|
||||
if (!$file_coverage) {
|
||||
continue;
|
||||
}
|
||||
$coverage[] = $file_coverage;
|
||||
}
|
||||
|
||||
$coverage = ArcanistUnitTestResult::mergeCoverage($coverage);
|
||||
if ($left_new || $right_new) {
|
||||
$diff_map = array();
|
||||
if ($left) {
|
||||
$diff_map[] = $left->getDiff();
|
||||
}
|
||||
if ($right) {
|
||||
$diff_map[] = $right->getDiff();
|
||||
}
|
||||
$diff_map = mpull($diff_map, null, 'getPHID');
|
||||
|
||||
$buildables = id(new HarbormasterBuildableQuery())
|
||||
->setViewer($viewer)
|
||||
->withBuildablePHIDs(array_keys($diff_map))
|
||||
->withManualBuildables(false)
|
||||
->needBuilds(true)
|
||||
->needTargets(true)
|
||||
->execute();
|
||||
$buildables = mpull($buildables, null, 'getBuildablePHID');
|
||||
foreach ($diff_map as $diff_phid => $changeset_diff) {
|
||||
$changeset_diff->attachBuildable(idx($buildables, $diff_phid));
|
||||
}
|
||||
}
|
||||
|
||||
$coverage = null;
|
||||
if ($right_new) {
|
||||
$coverage = $this->loadCoverage($right);
|
||||
}
|
||||
|
||||
$spec = $request->getStr('range');
|
||||
|
@ -248,15 +251,19 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
|||
->setMask($mask);
|
||||
|
||||
if ($request->isAjax()) {
|
||||
// NOTE: We must render the changeset before we render coverage
|
||||
// information, since it builds some caches.
|
||||
$rendered_changeset = $parser->renderChangeset();
|
||||
|
||||
$mcov = $parser->renderModifiedCoverage();
|
||||
|
||||
$coverage = array(
|
||||
$coverage_data = array(
|
||||
'differential-mcoverage-'.md5($changeset->getFilename()) => $mcov,
|
||||
);
|
||||
|
||||
return id(new PhabricatorChangesetResponse())
|
||||
->setRenderedChangeset($parser->renderChangeset())
|
||||
->setCoverage($coverage)
|
||||
->setRenderedChangeset($rendered_changeset)
|
||||
->setCoverage($coverage_data)
|
||||
->setUndoTemplates($parser->getRenderer()->renderUndoTemplates());
|
||||
}
|
||||
|
||||
|
@ -356,33 +363,62 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
|||
}
|
||||
|
||||
private function buildLintInlineComments($changeset) {
|
||||
$lint = id(new DifferentialDiffProperty())->loadOneWhere(
|
||||
'diffID = %d AND name = %s',
|
||||
$changeset->getDiffID(),
|
||||
'arc:lint');
|
||||
if (!$lint) {
|
||||
$diff = $changeset->getDiff();
|
||||
|
||||
$target_phids = $diff->getBuildTargetPHIDs();
|
||||
if (!$target_phids) {
|
||||
return array();
|
||||
}
|
||||
$lint = $lint->getData();
|
||||
|
||||
$messages = id(new HarbormasterBuildLintMessage())->loadAllWhere(
|
||||
'buildTargetPHID IN (%Ls) AND path = %s',
|
||||
$target_phids,
|
||||
$changeset->getFilename());
|
||||
|
||||
if (!$messages) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$template = id(new DifferentialInlineComment())
|
||||
->setChangesetID($changeset->getID())
|
||||
->setIsNewFile(1)
|
||||
->setLineLength(0);
|
||||
|
||||
$inlines = array();
|
||||
foreach ($lint as $msg) {
|
||||
if ($msg['path'] != $changeset->getFilename()) {
|
||||
continue;
|
||||
}
|
||||
$inline = new DifferentialInlineComment();
|
||||
$inline->setChangesetID($changeset->getID());
|
||||
$inline->setIsNewFile(1);
|
||||
$inline->setSyntheticAuthor(pht('Lint: %s', $msg['name']));
|
||||
$inline->setLineNumber($msg['line']);
|
||||
$inline->setLineLength(0);
|
||||
foreach ($messages as $message) {
|
||||
$description = $message->getProperty('description');
|
||||
$description = '%%%'.$description.'%%%';
|
||||
|
||||
$inline->setContent('%%%'.$msg['description'].'%%%');
|
||||
|
||||
$inlines[] = $inline;
|
||||
$inlines[] = id(clone $template)
|
||||
->setSyntheticAuthor(pht('Lint: %s', $message->getName()))
|
||||
->setLineNumber($message->getLine())
|
||||
->setContent($description);
|
||||
}
|
||||
|
||||
return $inlines;
|
||||
}
|
||||
|
||||
private function loadCoverage(DifferentialChangeset $changeset) {
|
||||
$target_phids = $changeset->getDiff()->getBuildTargetPHIDs();
|
||||
if (!$target_phids) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$unit = id(new HarbormasterBuildUnitMessage())->loadAllWhere(
|
||||
'buildTargetPHID IN (%Ls)',
|
||||
$target_phids);
|
||||
|
||||
$coverage = array();
|
||||
foreach ($unit as $message) {
|
||||
$test_coverage = $message->getProperty('coverage', array());
|
||||
$coverage_data = idx($test_coverage, $changeset->getFileName());
|
||||
if (!strlen($coverage_data)) {
|
||||
continue;
|
||||
}
|
||||
$coverage[] = $coverage_data;
|
||||
}
|
||||
|
||||
return ArcanistUnitTestResult::mergeCoverage($coverage);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,6 +29,17 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
->setURI('/D'.$diff->getRevisionID().'?id='.$diff->getID());
|
||||
}
|
||||
|
||||
$diff_phid = $diff->getPHID();
|
||||
$buildables = id(new HarbormasterBuildableQuery())
|
||||
->setViewer($viewer)
|
||||
->withBuildablePHIDs(array($diff_phid))
|
||||
->withManualBuildables(false)
|
||||
->needBuilds(true)
|
||||
->needTargets(true)
|
||||
->execute();
|
||||
$buildables = mpull($buildables, null, 'getBuildablePHID');
|
||||
$diff->attachBuildable(idx($buildables, $diff_phid));
|
||||
|
||||
// TODO: implement optgroup support in AphrontFormSelectControl?
|
||||
$select = array();
|
||||
$select[] = hsprintf('<optgroup label="%s">', pht('Create New Revision'));
|
||||
|
@ -108,7 +119,7 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
$table_of_contents = id(new DifferentialDiffTableOfContentsView())
|
||||
->setChangesets($changesets)
|
||||
->setVisibleChangesets($changesets)
|
||||
->setUnitTestData(idx($props, 'arc:unit', array()));
|
||||
->setCoverageMap($diff->loadCoverageMap($viewer));
|
||||
|
||||
$refs = array();
|
||||
foreach ($changesets as $changeset) {
|
||||
|
|
|
@ -191,16 +191,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$visible_changesets[$changeset_id] = $changesets[$changeset_id];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($props['arc:lint'])) {
|
||||
$changeset_paths = mpull($changesets, null, 'getFilename');
|
||||
foreach ($props['arc:lint'] as $lint) {
|
||||
$changeset = idx($changeset_paths, $lint['path']);
|
||||
if ($changeset) {
|
||||
$visible_changesets[$changeset->getID()] = $changeset;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$warning = null;
|
||||
$visible_changesets = $changesets;
|
||||
|
@ -363,7 +353,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$toc_view->setChangesets($changesets);
|
||||
$toc_view->setVisibleChangesets($visible_changesets);
|
||||
$toc_view->setRenderingReferences($rendering_references);
|
||||
$toc_view->setUnitTestData(idx($props, 'arc:unit', array()));
|
||||
$toc_view->setCoverageMap($target->loadCoverageMap($user));
|
||||
if ($repository) {
|
||||
$toc_view->setRepository($repository);
|
||||
}
|
||||
|
|
|
@ -29,20 +29,11 @@ abstract class DifferentialHarbormasterField
|
|||
$diff->attachProperty($key, idx($properties, $key));
|
||||
}
|
||||
|
||||
$messages = array();
|
||||
|
||||
$buildable = $diff->getBuildable();
|
||||
if ($buildable) {
|
||||
$target_phids = array();
|
||||
foreach ($buildable->getBuilds() as $build) {
|
||||
foreach ($build->getBuildTargets() as $target) {
|
||||
$target_phids[] = $target->getPHID();
|
||||
}
|
||||
}
|
||||
|
||||
if ($target_phids) {
|
||||
$messages = $this->loadHarbormasterTargetMessages($target_phids);
|
||||
}
|
||||
$target_phids = $diff->getBuildTargetPHIDs();
|
||||
if ($target_phids) {
|
||||
$messages = $this->loadHarbormasterTargetMessages($target_phids);
|
||||
} else {
|
||||
$messages = array();
|
||||
}
|
||||
|
||||
if (!$messages) {
|
||||
|
|
|
@ -37,9 +37,10 @@ final class DifferentialLandingActionMenuEventListener
|
|||
return null;
|
||||
}
|
||||
|
||||
$strategies = id(new PhutilSymbolLoader())
|
||||
$strategies = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('DifferentialLandingStrategy')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
foreach ($strategies as $strategy) {
|
||||
$viewer = $event->getUser();
|
||||
$action = $strategy->createMenuItem($viewer, $revision, $repository);
|
||||
|
|
|
@ -603,9 +603,9 @@ final class DifferentialHunkParser extends Phobject {
|
|||
$start = $start - $add_context;
|
||||
$end = $end + $add_context;
|
||||
$hunk_content = array();
|
||||
$hunk_pos = array( '-' => 0, '+' => 0 );
|
||||
$hunk_offset = array( '-' => null, '+' => null );
|
||||
$hunk_last = array( '-' => null, '+' => null );
|
||||
$hunk_pos = array('-' => 0, '+' => 0);
|
||||
$hunk_offset = array('-' => null, '+' => null);
|
||||
$hunk_last = array('-' => null, '+' => null);
|
||||
foreach (explode("\n", $hunk->getChanges()) as $line) {
|
||||
$in_common = strncmp($line, ' ', 1) === 0;
|
||||
$in_old = strncmp($line, '-', 1) === 0 || $in_common;
|
||||
|
|
|
@ -331,6 +331,47 @@ final class DifferentialDiff
|
|||
return $this->assertAttached($this->buildable);
|
||||
}
|
||||
|
||||
public function getBuildTargetPHIDs() {
|
||||
$buildable = $this->getBuildable();
|
||||
|
||||
if (!$buildable) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$target_phids = array();
|
||||
foreach ($buildable->getBuilds() as $build) {
|
||||
foreach ($build->getBuildTargets() as $target) {
|
||||
$target_phids[] = $target->getPHID();
|
||||
}
|
||||
}
|
||||
|
||||
return $target_phids;
|
||||
}
|
||||
|
||||
public function loadCoverageMap(PhabricatorUser $viewer) {
|
||||
$target_phids = $this->getBuildTargetPHIDs();
|
||||
if (!$target_phids) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$unit = id(new HarbormasterBuildUnitMessage())->loadAllWhere(
|
||||
'buildTargetPHID IN (%Ls)',
|
||||
$target_phids);
|
||||
|
||||
$map = array();
|
||||
foreach ($unit as $message) {
|
||||
$coverage = $message->getProperty('coverage', array());
|
||||
foreach ($coverage as $path => $coverage_data) {
|
||||
$map[$path][] = $coverage_data;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($map as $path => $coverage_items) {
|
||||
$map[$path] = ArcanistUnitTestResult::mergeCoverage($coverage_items);
|
||||
}
|
||||
|
||||
return $map;
|
||||
}
|
||||
|
||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
|
|||
private $renderURI = '/differential/changeset/';
|
||||
private $revisionID;
|
||||
private $whitespace;
|
||||
private $unitTestData;
|
||||
private $coverageMap;
|
||||
|
||||
public function setChangesets($changesets) {
|
||||
$this->changesets = $changesets;
|
||||
|
@ -37,8 +37,8 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setUnitTestData($unit_test_data) {
|
||||
$this->unitTestData = $unit_test_data;
|
||||
public function setCoverageMap(array $coverage_map) {
|
||||
$this->coverageMap = $coverage_map;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -60,23 +60,6 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
|
|||
|
||||
$rows = array();
|
||||
|
||||
$coverage = array();
|
||||
if ($this->unitTestData) {
|
||||
$coverage_by_file = array();
|
||||
foreach ($this->unitTestData as $result) {
|
||||
$test_coverage = idx($result, 'coverage');
|
||||
if (!$test_coverage) {
|
||||
continue;
|
||||
}
|
||||
foreach ($test_coverage as $file => $results) {
|
||||
$coverage_by_file[$file][] = $results;
|
||||
}
|
||||
}
|
||||
foreach ($coverage_by_file as $file => $coverages) {
|
||||
$coverage[$file] = ArcanistUnitTestResult::mergeCoverage($coverages);
|
||||
}
|
||||
}
|
||||
|
||||
$changesets = $this->changesets;
|
||||
$paths = array();
|
||||
foreach ($changesets as $id => $changeset) {
|
||||
|
@ -144,7 +127,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
|
|||
'M');
|
||||
|
||||
$fname = $changeset->getFilename();
|
||||
$cov = $this->renderCoverage($coverage, $fname);
|
||||
$cov = $this->renderCoverage($this->coverageMap, $fname);
|
||||
if ($cov === null) {
|
||||
$mcov = $cov = phutil_tag('em', array(), '-');
|
||||
} else {
|
||||
|
|
|
@ -64,9 +64,10 @@ final class DiffusionSymbolController extends DiffusionController {
|
|||
$external_query->withLanguages(array($request->getStr('lang')));
|
||||
}
|
||||
|
||||
$external_sources = id(new PhutilSymbolLoader())
|
||||
$external_sources = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('DiffusionExternalSymbolsSource')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
$results = array($symbols);
|
||||
foreach ($external_sources as $source) {
|
||||
$results[] = $source->executeQuery($external_query);
|
||||
|
|
|
@ -414,10 +414,9 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow {
|
|||
$version['atom'] = DivinerAtom::getAtomSerializationVersion();
|
||||
$version['rules'] = $this->getRules();
|
||||
|
||||
$atomizers = id(new PhutilSymbolLoader())
|
||||
$atomizers = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('DivinerAtomizer')
|
||||
->setConcreteOnly(true)
|
||||
->selectAndLoadSymbols();
|
||||
->execute();
|
||||
|
||||
$atomizer_versions = array();
|
||||
foreach ($atomizers as $atomizer) {
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
|
||||
final class DoorkeeperTagsController extends PhabricatorController {
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $request->getViewer();
|
||||
|
||||
$tags = $request->getStr('tags');
|
||||
try {
|
||||
|
|
|
@ -88,14 +88,12 @@ final class DoorkeeperImportEngine extends Phobject {
|
|||
}
|
||||
|
||||
if (!$this->localOnly) {
|
||||
$bridges = id(new PhutilSymbolLoader())
|
||||
$bridges = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('DoorkeeperBridge')
|
||||
->loadObjects();
|
||||
->setFilterMethod('isEnabled')
|
||||
->execute();
|
||||
|
||||
foreach ($bridges as $key => $bridge) {
|
||||
if (!$bridge->isEnabled()) {
|
||||
unset($bridges[$key]);
|
||||
}
|
||||
$bridge->setViewer($viewer);
|
||||
$bridge->setThrowOnMissingLink($this->throwOnMissingLink);
|
||||
}
|
||||
|
|
|
@ -120,9 +120,9 @@ final class PhabricatorAsanaConfigOptions
|
|||
|
||||
$viewer = $request->getUser();
|
||||
|
||||
$publishers = id(new PhutilSymbolLoader())
|
||||
$publishers = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('DoorkeeperFeedStoryPublisher')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
$out = array();
|
||||
$out[] = pht(
|
||||
|
|
|
@ -125,9 +125,9 @@ abstract class DoorkeeperFeedWorker extends FeedPushWorker {
|
|||
$viewer = $this->getViewer();
|
||||
$object = $this->getStoryObject();
|
||||
|
||||
$publishers = id(new PhutilSymbolLoader())
|
||||
$publishers = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('DoorkeeperFeedStoryPublisher')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
foreach ($publishers as $publisher) {
|
||||
if (!$publisher->canPublishStory($story, $object)) {
|
||||
|
|
|
@ -23,6 +23,7 @@ final class FeedPublisherWorker extends FeedPushWorker {
|
|||
);
|
||||
|
||||
// Find and schedule all the enabled Doorkeeper publishers.
|
||||
// TODO: Use PhutilClassMapQuery?
|
||||
$doorkeeper_workers = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass('DoorkeeperFeedWorker')
|
||||
->loadObjects($argv);
|
||||
|
|
|
@ -882,18 +882,9 @@ final class PhabricatorFile extends PhabricatorFileDAO
|
|||
}
|
||||
|
||||
public static function buildAllEngines() {
|
||||
$engines = id(new PhutilSymbolLoader())
|
||||
->setType('class')
|
||||
->setConcreteOnly(true)
|
||||
return id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorFileStorageEngine')
|
||||
->selectAndLoadSymbols();
|
||||
|
||||
$results = array();
|
||||
foreach ($engines as $engine_class) {
|
||||
$results[] = newv($engine_class['name'], array());
|
||||
}
|
||||
|
||||
return $results;
|
||||
->execute();
|
||||
}
|
||||
|
||||
public function getViewableMimeType() {
|
||||
|
|
|
@ -100,11 +100,13 @@ final class PhabricatorFlagSearchEngine
|
|||
}
|
||||
|
||||
private function getObjectFilterOptions() {
|
||||
$objects = id(new PhutilSymbolLoader())
|
||||
$objects = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorFlaggableInterface')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
$all_types = PhabricatorPHIDType::getAllTypes();
|
||||
$options = array();
|
||||
|
||||
foreach ($objects as $object) {
|
||||
$phid = $object->generatePHID();
|
||||
$phid_type = phid_get_type($phid);
|
||||
|
|
|
@ -172,34 +172,26 @@ final class HarbormasterBuildViewController
|
|||
}
|
||||
|
||||
$details = $build_target->getDetails();
|
||||
if ($details) {
|
||||
$properties = new PHUIPropertyListView();
|
||||
foreach ($details as $key => $value) {
|
||||
$properties->addProperty($key, $value);
|
||||
}
|
||||
$target_box->addPropertyList($properties, pht('Configuration'));
|
||||
$properties = new PHUIPropertyListView();
|
||||
foreach ($details as $key => $value) {
|
||||
$properties->addProperty($key, $value);
|
||||
}
|
||||
$target_box->addPropertyList($properties, pht('Configuration'));
|
||||
|
||||
$variables = $build_target->getVariables();
|
||||
if ($variables) {
|
||||
$properties = new PHUIPropertyListView();
|
||||
$properties->addRawContent($this->buildProperties($variables));
|
||||
$target_box->addPropertyList($properties, pht('Variables'));
|
||||
}
|
||||
$properties = new PHUIPropertyListView();
|
||||
$properties->addRawContent($this->buildProperties($variables));
|
||||
$target_box->addPropertyList($properties, pht('Variables'));
|
||||
|
||||
$artifacts = $this->buildArtifacts($build_target);
|
||||
if ($artifacts) {
|
||||
$properties = new PHUIPropertyListView();
|
||||
$properties->addRawContent($artifacts);
|
||||
$target_box->addPropertyList($properties, pht('Artifacts'));
|
||||
}
|
||||
$properties = new PHUIPropertyListView();
|
||||
$properties->addRawContent($artifacts);
|
||||
$target_box->addPropertyList($properties, pht('Artifacts'));
|
||||
|
||||
$build_messages = idx($messages, $build_target->getPHID(), array());
|
||||
if ($build_messages) {
|
||||
$properties = new PHUIPropertyListView();
|
||||
$properties->addRawContent($this->buildMessages($build_messages));
|
||||
$target_box->addPropertyList($properties, pht('Messages'));
|
||||
}
|
||||
$properties = new PHUIPropertyListView();
|
||||
$properties->addRawContent($this->buildMessages($build_messages));
|
||||
$target_box->addPropertyList($properties, pht('Messages'));
|
||||
|
||||
$properties = new PHUIPropertyListView();
|
||||
$properties->addProperty(
|
||||
|
@ -243,11 +235,8 @@ final class HarbormasterBuildViewController
|
|||
->withBuildTargetPHIDs(array($build_target->getPHID()))
|
||||
->execute();
|
||||
|
||||
if (count($artifacts) === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$list = id(new PHUIObjectItemListView())
|
||||
->setNoDataString(pht('This target has no associated artifacts.'))
|
||||
->setFlush(true);
|
||||
|
||||
foreach ($artifacts as $artifact) {
|
||||
|
|
|
@ -22,6 +22,15 @@ final class HarbormasterPlanRunController extends HarbormasterController {
|
|||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$cancel_uri = $this->getApplicationURI("plan/{$plan_id}/");
|
||||
|
||||
if (!$plan->canRunManually()) {
|
||||
return $this->newDialog()
|
||||
->setTitle(pht('Can Not Run Plan'))
|
||||
->appendParagraph(pht('This plan can not be run manually.'))
|
||||
->addCancelButton($cancel_uri);
|
||||
}
|
||||
|
||||
$e_name = true;
|
||||
$v_name = null;
|
||||
|
||||
|
@ -65,7 +74,6 @@ final class HarbormasterPlanRunController extends HarbormasterController {
|
|||
}
|
||||
|
||||
$title = pht('Run Build Plan Manually');
|
||||
$cancel_uri = $this->getApplicationURI("plan/{$plan_id}/");
|
||||
$save_button = pht('Run Plan Manually');
|
||||
|
||||
$form = id(new PHUIFormLayoutView())
|
||||
|
|
|
@ -289,12 +289,14 @@ final class HarbormasterPlanViewController extends HarbormasterPlanController {
|
|||
->setIcon('fa-ban'));
|
||||
}
|
||||
|
||||
$can_run = ($has_manage && $plan->canRunManually());
|
||||
|
||||
$list->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Run Plan Manually'))
|
||||
->setHref($this->getApplicationURI("plan/run/{$id}/"))
|
||||
->setWorkflow(true)
|
||||
->setDisabled(!$has_manage)
|
||||
->setDisabled(!$can_run)
|
||||
->setIcon('fa-play-circle'));
|
||||
|
||||
return $list;
|
||||
|
|
|
@ -64,6 +64,11 @@ final class HarbormasterManagementBuildWorkflow
|
|||
pht('Build plan "%s" does not exist.', $plan_id));
|
||||
}
|
||||
|
||||
if (!$plan->canRunManually()) {
|
||||
throw new PhutilArgumentUsageException(
|
||||
pht('This build plan can not be run manually.'));
|
||||
}
|
||||
|
||||
$console = PhutilConsole::getConsole();
|
||||
|
||||
$buildable = HarbormasterBuildable::initializeNewBuildable($viewer)
|
||||
|
|
|
@ -27,12 +27,11 @@ final class HarbormasterBuildPHIDType extends PhabricatorPHIDType {
|
|||
|
||||
foreach ($handles as $phid => $handle) {
|
||||
$build = $objects[$phid];
|
||||
$handles[$phid]->setName(pht(
|
||||
'Build %d: %s',
|
||||
$build->getID(),
|
||||
$build->getName()));
|
||||
$handles[$phid]->setURI(
|
||||
'/harbormaster/build/'.$build->getID());
|
||||
$build_id = $build->getID();
|
||||
$name = $build->getName();
|
||||
|
||||
$handle->setName(pht('Build %d: %s', $build_id, $name));
|
||||
$handle->setURI("/harbormaster/build/{$build_id}/");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,17 @@ final class HarbormasterBuildTargetPHIDType extends PhabricatorPHIDType {
|
|||
array $objects) {
|
||||
|
||||
foreach ($handles as $phid => $handle) {
|
||||
$build_target = $objects[$phid];
|
||||
$target = $objects[$phid];
|
||||
$target_id = $target->getID();
|
||||
|
||||
// Build target don't currently have their own page, so just point
|
||||
// the user at the build until we have one.
|
||||
$build = $target->getBuild();
|
||||
$build_id = $build->getID();
|
||||
$uri = "/harbormaster/build/{$build_id}/";
|
||||
|
||||
$handle->setName(pht('Build Target %d', $target_id));
|
||||
$handle->setURI($uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -291,9 +291,9 @@ final class HarbormasterBuild extends HarbormasterDAO
|
|||
}
|
||||
|
||||
public static function getAvailableBuildVariables() {
|
||||
$objects = id(new PhutilSymbolLoader())
|
||||
$objects = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('HarbormasterBuildableInterface')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
$variables = array();
|
||||
$variables[] = array(
|
||||
|
|
|
@ -85,6 +85,15 @@ final class HarbormasterBuildPlan extends HarbormasterDAO
|
|||
}
|
||||
|
||||
|
||||
public function canRunManually() {
|
||||
if ($this->isAutoplan()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function getName() {
|
||||
$autoplan = $this->getAutoplan();
|
||||
if ($autoplan) {
|
||||
|
|
|
@ -5,11 +5,31 @@
|
|||
*/
|
||||
final class HarbormasterBuildWorker extends HarbormasterWorker {
|
||||
|
||||
public function renderForDisplay(PhabricatorUser $viewer) {
|
||||
try {
|
||||
$build = $this->loadBuild();
|
||||
} catch (Exception $ex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $viewer->renderHandle($build->getPHID());
|
||||
}
|
||||
|
||||
protected function doWork() {
|
||||
$viewer = $this->getViewer();
|
||||
$build = $this->loadBuild();
|
||||
|
||||
id(new HarbormasterBuildEngine())
|
||||
->setViewer($viewer)
|
||||
->setBuild($build)
|
||||
->continueBuild();
|
||||
}
|
||||
|
||||
private function loadBuild() {
|
||||
$data = $this->getTaskData();
|
||||
$id = idx($data, 'buildID');
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$viewer = $this->getViewer();
|
||||
$build = id(new HarbormasterBuildQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($id))
|
||||
|
@ -19,10 +39,7 @@ final class HarbormasterBuildWorker extends HarbormasterWorker {
|
|||
pht('Invalid build ID "%s".', $id));
|
||||
}
|
||||
|
||||
id(new HarbormasterBuildEngine())
|
||||
->setViewer($viewer)
|
||||
->setBuild($build)
|
||||
->continueBuild();
|
||||
return $build;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,6 +11,16 @@ final class HarbormasterTargetWorker extends HarbormasterWorker {
|
|||
return phutil_units('24 hours in seconds');
|
||||
}
|
||||
|
||||
public function renderForDisplay(PhabricatorUser $viewer) {
|
||||
try {
|
||||
$target = $this->loadBuildTarget();
|
||||
} catch (Exception $ex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $viewer->renderHandle($target->getPHID());
|
||||
}
|
||||
|
||||
private function loadBuildTarget() {
|
||||
$data = $this->getTaskData();
|
||||
$id = idx($data, 'targetID');
|
||||
|
|
|
@ -45,6 +45,9 @@ final class HeraldTestConsoleController extends HeraldController {
|
|||
} else if ($object instanceof PhrictionDocument) {
|
||||
$adapter = id(new PhrictionDocumentHeraldAdapter())
|
||||
->setDocument($object);
|
||||
} else if ($object instanceof PonderQuestion) {
|
||||
$adapter = id(new HeraldPonderQuestionAdapter())
|
||||
->setQuestion($object);
|
||||
} else {
|
||||
throw new Exception(pht('Can not build adapter for object!'));
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController {
|
|||
|
||||
$revisions = $revision_query->execute();
|
||||
|
||||
list($blocking, $active, ) = DifferentialRevisionQuery::splitResponsible(
|
||||
list($blocking, $active,) = DifferentialRevisionQuery::splitResponsible(
|
||||
$revisions,
|
||||
array($user_phid));
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ final class PhabricatorLipsumGenerateWorkflow
|
|||
public function execute(PhutilArgumentParser $args) {
|
||||
$console = PhutilConsole::getConsole();
|
||||
|
||||
$supported_types = id(new PhutilSymbolLoader())
|
||||
$supported_types = id(new PhutilClassMapQuery())
|
||||
->setAncestorClass('PhabricatorTestDataGenerator')
|
||||
->loadObjects();
|
||||
->execute();
|
||||
|
||||
$console->writeOut(
|
||||
"%s:\n\t%s\n",
|
||||
|
|
|
@ -6,17 +6,13 @@ final class PhabricatorApplicationUninstallController
|
|||
private $application;
|
||||
private $action;
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->application = $data['application'];
|
||||
$this->action = $data['action'];
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $request->getViewer();
|
||||
$this->action = $request->getURIData('action');
|
||||
$this->application = $request->getURIData('application');
|
||||
|
||||
$selected = id(new PhabricatorApplicationQuery())
|
||||
->setViewer($user)
|
||||
->setViewer($viewer)
|
||||
->withClasses(array($this->application))
|
||||
->requireCapabilities(
|
||||
array(
|
||||
|
@ -35,7 +31,7 @@ final class PhabricatorApplicationUninstallController
|
|||
'phabricator.show-prototypes');
|
||||
|
||||
$dialog = id(new AphrontDialogView())
|
||||
->setUser($user)
|
||||
->setUser($viewer)
|
||||
->addCancelButton($view_uri);
|
||||
|
||||
if ($selected->isPrototype() && !$prototypes_enabled) {
|
||||
|
@ -118,7 +114,7 @@ final class PhabricatorApplicationUninstallController
|
|||
}
|
||||
|
||||
PhabricatorConfigEditor::storeNewValue(
|
||||
$this->getRequest()->getUser(),
|
||||
$this->getViewer(),
|
||||
$config_entry,
|
||||
$list,
|
||||
PhabricatorContentSource::newFromRequest($this->getRequest()));
|
||||
|
|
|
@ -3,19 +3,13 @@
|
|||
final class PhabricatorApplicationsListController
|
||||
extends PhabricatorApplicationsController {
|
||||
|
||||
private $queryKey;
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->queryKey = idx($data, 'queryKey');
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$controller = id(new PhabricatorApplicationSearchController())
|
||||
->setQueryKey($this->queryKey)
|
||||
->setQueryKey($request->getURIData('queryKey'))
|
||||
->setSearchEngine(new PhabricatorAppSearchEngine())
|
||||
->setNavigation($this->buildSideNavView());
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ final class PhabricatorMetaMTAWorker
|
|||
pht('Unable to load message!'));
|
||||
}
|
||||
|
||||
if ($message->getStatus() != PhabricatorMetaMTAMail::STATUS_QUEUE) {
|
||||
if ($message->getStatus() != PhabricatorMailOutboundStatus::STATUS_QUEUE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
final class PhabricatorMetaMTAApplication extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return pht('MetaMTA');
|
||||
return pht('Mail');
|
||||
}
|
||||
|
||||
public function getBaseURI() {
|
||||
|
@ -15,11 +15,11 @@ final class PhabricatorMetaMTAApplication extends PhabricatorApplication {
|
|||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return pht('Delivers Mail');
|
||||
return pht('Send and Receive Mail');
|
||||
}
|
||||
|
||||
public function getFlavorText() {
|
||||
return pht('Yo dawg, we heard you like MTAs.');
|
||||
return pht('Every program attempts to expand until it can read mail.');
|
||||
}
|
||||
|
||||
public function getApplicationGroup() {
|
||||
|
@ -30,12 +30,8 @@ final class PhabricatorMetaMTAApplication extends PhabricatorApplication {
|
|||
return false;
|
||||
}
|
||||
|
||||
public function isLaunchable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getTypeaheadURI() {
|
||||
return null;
|
||||
return '/mail/';
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
<?php
|
||||
|
||||
abstract class MetaMTAConstants extends Phobject {}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue