1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-11 16:16:14 +01:00

(stable) Promote 2015 Week 33

This commit is contained in:
epriestley 2015-08-15 06:47:26 -07:00
commit e470b6bee2
198 changed files with 2246 additions and 2165 deletions

View file

@ -1,5 +1,4 @@
{ {
"phabricator.uri": "https://secure.phabricator.com/", "phabricator.uri": "https://secure.phabricator.com/",
"unit.engine": "PhutilUnitTestEngine",
"load": ["src/"] "load": ["src/"]
} }

8
.arcunit Normal file
View file

@ -0,0 +1,8 @@
{
"engines": {
"phutil": {
"type": "phutil",
"include": "(\\.php$)"
}
}
}

View file

@ -93,7 +93,7 @@ return array(
'rsrc/css/application/policy/policy-edit.css' => '815c66f7', 'rsrc/css/application/policy/policy-edit.css' => '815c66f7',
'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43', 'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43',
'rsrc/css/application/policy/policy.css' => '957ea14c', '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/projects/project-icon.css' => '4e3eaa5a',
'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733',
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', '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-tag-view.css' => '402691cc',
'rsrc/css/phui/phui-text.css' => 'cf019f54', 'rsrc/css/phui/phui-text.css' => 'cf019f54',
'rsrc/css/phui/phui-timeline-view.css' => 'f1bccf73', '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-workboard-view.css' => '6704d68d',
'rsrc/css/phui/phui-workpanel-view.css' => 'adec7699', 'rsrc/css/phui/phui-workpanel-view.css' => 'adec7699',
'rsrc/css/sprite-login.css' => '1ebb9bf9', '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/phortune/phortune-credit-card-form.js' => '2290aeef',
'rsrc/js/application/policy/behavior-policy-control.js' => '7d470398', 'rsrc/js/application/policy/behavior-policy-control.js' => '7d470398',
'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '5e9f347c', '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-boards.js' => 'ba4fa35c',
'rsrc/js/application/projects/behavior-project-create.js' => '065227cc', 'rsrc/js/application/projects/behavior-project-create.js' => '065227cc',
'rsrc/js/application/projects/behavior-reorder-columns.js' => 'e1d25dfb', 'rsrc/js/application/projects/behavior-reorder-columns.js' => 'e1d25dfb',
@ -632,7 +632,6 @@ return array(
'javelin-behavior-phui-object-box-tabs' => '2bfa2836', 'javelin-behavior-phui-object-box-tabs' => '2bfa2836',
'javelin-behavior-policy-control' => '7d470398', 'javelin-behavior-policy-control' => '7d470398',
'javelin-behavior-policy-rule-editor' => '5e9f347c', 'javelin-behavior-policy-rule-editor' => '5e9f347c',
'javelin-behavior-ponder-votebox' => '4e9b766b',
'javelin-behavior-project-boards' => 'ba4fa35c', 'javelin-behavior-project-boards' => 'ba4fa35c',
'javelin-behavior-project-create' => '065227cc', 'javelin-behavior-project-create' => '065227cc',
'javelin-behavior-quicksand-blacklist' => '7927a7d3', 'javelin-behavior-quicksand-blacklist' => '7927a7d3',
@ -803,6 +802,7 @@ return array(
'phui-text-css' => 'cf019f54', 'phui-text-css' => 'cf019f54',
'phui-theme-css' => '6b451f24', 'phui-theme-css' => '6b451f24',
'phui-timeline-view-css' => 'f1bccf73', 'phui-timeline-view-css' => 'f1bccf73',
'phui-two-column-view-css' => 'add0a7d1',
'phui-workboard-view-css' => '6704d68d', 'phui-workboard-view-css' => '6704d68d',
'phui-workpanel-view-css' => 'adec7699', 'phui-workpanel-view-css' => 'adec7699',
'phuix-action-list-view' => 'b5c256b8', 'phuix-action-list-view' => 'b5c256b8',
@ -811,7 +811,7 @@ return array(
'policy-css' => '957ea14c', 'policy-css' => '957ea14c',
'policy-edit-css' => '815c66f7', 'policy-edit-css' => '815c66f7',
'policy-transaction-detail-css' => '82100a43', 'policy-transaction-detail-css' => '82100a43',
'ponder-view-css' => 'fcd6b398', 'ponder-view-css' => '6a399881',
'project-icon-css' => '4e3eaa5a', 'project-icon-css' => '4e3eaa5a',
'raphael-core' => '51ee6b43', 'raphael-core' => '51ee6b43',
'raphael-g' => '40dde778', 'raphael-g' => '40dde778',
@ -1142,13 +1142,6 @@ return array(
'javelin-stratcom', 'javelin-stratcom',
'javelin-dom', 'javelin-dom',
), ),
'4e9b766b' => array(
'javelin-behavior',
'javelin-dom',
'javelin-util',
'javelin-stratcom',
'javelin-request',
),
'4fdb476d' => array( '4fdb476d' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_ponder.ponder_answer
DROP COLUMN contentSource;

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_ponder.ponder_question
DROP COLUMN editPolicy;

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_ponder.ponder_question
MODIFY status VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT};

View file

@ -0,0 +1,2 @@
UPDATE {$NAMESPACE}_ponder.ponder_question
SET status = 'open' WHERE status = '0';

View file

@ -0,0 +1,2 @@
UPDATE {$NAMESPACE}_ponder.ponder_question
SET status = 'resolved' WHERE status = '1';

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_ponder.ponder_question
DROP COLUMN heat;

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_ponder.ponder_question
DROP COLUMN voteCount;

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_ponder.ponder_answer
ADD status VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT};

View file

@ -0,0 +1,2 @@
UPDATE {$NAMESPACE}_ponder.ponder_answer
SET status = 'visible' WHERE status = '';

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('AlmanacManagementWorkflow') ->setAncestorClass('AlmanacManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorCacheManagementWorkflow') ->setAncestorClass('PhabricatorCacheManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -16,8 +16,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorDaemonManagementWorkflow') ->setAncestorClass('PhabricatorDaemonManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOHELP
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('DivinerWorkflow') ->setAncestorClass('DivinerWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('DrydockManagementWorkflow') ->setAncestorClass('DrydockManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -15,8 +15,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorFactManagementWorkflow') ->setAncestorClass('PhabricatorFactManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorFilesManagementWorkflow') ->setAncestorClass('PhabricatorFilesManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorLipsumManagementWorkflow') ->setAncestorClass('PhabricatorLipsumManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorMailManagementWorkflow') ->setAncestorClass('PhabricatorMailManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -15,8 +15,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorRepositoryManagementWorkflow') ->setAncestorClass('PhabricatorRepositoryManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorSearchManagementWorkflow') ->setAncestorClass('PhabricatorSearchManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorAuditManagementWorkflow') ->setAncestorClass('PhabricatorAuditManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorAuthManagementWorkflow') ->setAncestorClass('PhabricatorAuthManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('CelerityManagementWorkflow') ->setAncestorClass('CelerityManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorConfigManagementWorkflow') ->setAncestorClass('PhabricatorConfigManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorFeedManagementWorkflow') ->setAncestorClass('PhabricatorFeedManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('HarbormasterManagementWorkflow') ->setAncestorClass('HarbormasterManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorHunksManagementWorkflow') ->setAncestorClass('PhabricatorHunksManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorInternationalizationManagementWorkflow') ->setAncestorClass('PhabricatorInternationalizationManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorPhortuneManagementWorkflow') ->setAncestorClass('PhabricatorPhortuneManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorPolicyManagementWorkflow') ->setAncestorClass('PhabricatorPolicyManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorSystemRemoveWorkflow') ->setAncestorClass('PhabricatorSystemRemoveWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorWorkerTriggerManagementWorkflow') ->setAncestorClass('PhabricatorWorkerTriggerManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorWorkerManagementWorkflow') ->setAncestorClass('PhabricatorWorkerManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -14,8 +14,8 @@ EOSYNOPSIS
); );
$args->parseStandardArguments(); $args->parseStandardArguments();
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorSMSManagementWorkflow') ->setAncestorClass('PhabricatorSMSManagementWorkflow')
->loadObjects(); ->execute();
$workflows[] = new PhutilHelpArgumentWorkflow(); $workflows[] = new PhutilHelpArgumentWorkflow();
$args->parseWorkflows($workflows); $args->parseWorkflows($workflows);

View file

@ -160,9 +160,9 @@ try {
exit(1); exit(1);
} }
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorStorageManagementWorkflow') ->setAncestorClass('PhabricatorStorageManagementWorkflow')
->loadObjects(); ->execute();
$patches = PhabricatorSQLPatchList::buildAllPatches(); $patches = PhabricatorSQLPatchList::buildAllPatches();

View file

@ -190,11 +190,10 @@ try {
$user->getUsername())); $user->getUsername()));
} }
$workflows = id(new PhutilSymbolLoader()) $workflows = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorSSHWorkflow') ->setAncestorClass('PhabricatorSSHWorkflow')
->loadObjects(); ->setUniqueMethod('getName')
->execute();
$workflow_names = mpull($workflows, 'getName', 'getName');
if (!$original_argv) { if (!$original_argv) {
throw new Exception( throw new Exception(
@ -210,7 +209,7 @@ try {
$user->getUsername(), $user->getUsername(),
'git clone', 'git clone',
'hg push', 'hg push',
implode(', ', $workflow_names))); implode(', ', array_keys($workflows))));
} }
$log_argv = implode(' ', $original_argv); $log_argv = implode(' ', $original_argv);
@ -231,7 +230,7 @@ try {
$parsed_args = new PhutilArgumentParser($parseable_argv); $parsed_args = new PhutilArgumentParser($parseable_argv);
if (empty($workflow_names[$command])) { if (empty($workflows[$command])) {
throw new Exception(pht('Invalid command.')); throw new Exception(pht('Invalid command.'));
} }

View file

@ -378,7 +378,6 @@ phutil_register_library_map(array(
'DifferentialFieldParseException' => 'applications/differential/exception/DifferentialFieldParseException.php', 'DifferentialFieldParseException' => 'applications/differential/exception/DifferentialFieldParseException.php',
'DifferentialFieldValidationException' => 'applications/differential/exception/DifferentialFieldValidationException.php', 'DifferentialFieldValidationException' => 'applications/differential/exception/DifferentialFieldValidationException.php',
'DifferentialFindConduitAPIMethod' => 'applications/differential/conduit/DifferentialFindConduitAPIMethod.php', 'DifferentialFindConduitAPIMethod' => 'applications/differential/conduit/DifferentialFindConduitAPIMethod.php',
'DifferentialFinishPostponedLintersConduitAPIMethod' => 'applications/differential/conduit/DifferentialFinishPostponedLintersConduitAPIMethod.php',
'DifferentialGetAllDiffsConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetAllDiffsConduitAPIMethod.php', 'DifferentialGetAllDiffsConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetAllDiffsConduitAPIMethod.php',
'DifferentialGetCommitMessageConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php', 'DifferentialGetCommitMessageConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php',
'DifferentialGetCommitPathsConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetCommitPathsConduitAPIMethod.php', 'DifferentialGetCommitPathsConduitAPIMethod' => 'applications/differential/conduit/DifferentialGetCommitPathsConduitAPIMethod.php',
@ -495,7 +494,6 @@ phutil_register_library_map(array(
'DifferentialUnitStatus' => 'applications/differential/constants/DifferentialUnitStatus.php', 'DifferentialUnitStatus' => 'applications/differential/constants/DifferentialUnitStatus.php',
'DifferentialUnitTestResult' => 'applications/differential/constants/DifferentialUnitTestResult.php', 'DifferentialUnitTestResult' => 'applications/differential/constants/DifferentialUnitTestResult.php',
'DifferentialUpdateRevisionConduitAPIMethod' => 'applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php', 'DifferentialUpdateRevisionConduitAPIMethod' => 'applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php',
'DifferentialUpdateUnitResultsConduitAPIMethod' => 'applications/differential/conduit/DifferentialUpdateUnitResultsConduitAPIMethod.php',
'DifferentialViewPolicyField' => 'applications/differential/customfield/DifferentialViewPolicyField.php', 'DifferentialViewPolicyField' => 'applications/differential/customfield/DifferentialViewPolicyField.php',
'DiffusionAuditorDatasource' => 'applications/diffusion/typeahead/DiffusionAuditorDatasource.php', 'DiffusionAuditorDatasource' => 'applications/diffusion/typeahead/DiffusionAuditorDatasource.php',
'DiffusionAuditorsAddAuditorsHeraldAction' => 'applications/diffusion/herald/DiffusionAuditorsAddAuditorsHeraldAction.php', 'DiffusionAuditorsAddAuditorsHeraldAction' => 'applications/diffusion/herald/DiffusionAuditorsAddAuditorsHeraldAction.php',
@ -1063,6 +1061,7 @@ phutil_register_library_map(array(
'HeraldNotifyActionGroup' => 'applications/herald/action/HeraldNotifyActionGroup.php', 'HeraldNotifyActionGroup' => 'applications/herald/action/HeraldNotifyActionGroup.php',
'HeraldObjectTranscript' => 'applications/herald/storage/transcript/HeraldObjectTranscript.php', 'HeraldObjectTranscript' => 'applications/herald/storage/transcript/HeraldObjectTranscript.php',
'HeraldPholioMockAdapter' => 'applications/pholio/herald/HeraldPholioMockAdapter.php', 'HeraldPholioMockAdapter' => 'applications/pholio/herald/HeraldPholioMockAdapter.php',
'HeraldPonderQuestionAdapter' => 'applications/ponder/herald/HeraldPonderQuestionAdapter.php',
'HeraldPreCommitAdapter' => 'applications/diffusion/herald/HeraldPreCommitAdapter.php', 'HeraldPreCommitAdapter' => 'applications/diffusion/herald/HeraldPreCommitAdapter.php',
'HeraldPreCommitContentAdapter' => 'applications/diffusion/herald/HeraldPreCommitContentAdapter.php', 'HeraldPreCommitContentAdapter' => 'applications/diffusion/herald/HeraldPreCommitContentAdapter.php',
'HeraldPreCommitRefAdapter' => 'applications/diffusion/herald/HeraldPreCommitRefAdapter.php', 'HeraldPreCommitRefAdapter' => 'applications/diffusion/herald/HeraldPreCommitRefAdapter.php',
@ -1249,7 +1248,6 @@ phutil_register_library_map(array(
'ManiphestTransactionSaveController' => 'applications/maniphest/controller/ManiphestTransactionSaveController.php', 'ManiphestTransactionSaveController' => 'applications/maniphest/controller/ManiphestTransactionSaveController.php',
'ManiphestUpdateConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php', 'ManiphestUpdateConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php',
'ManiphestView' => 'applications/maniphest/view/ManiphestView.php', 'ManiphestView' => 'applications/maniphest/view/ManiphestView.php',
'MetaMTAConstants' => 'applications/metamta/constants/MetaMTAConstants.php',
'MetaMTAEmailTransactionCommand' => 'applications/metamta/command/MetaMTAEmailTransactionCommand.php', 'MetaMTAEmailTransactionCommand' => 'applications/metamta/command/MetaMTAEmailTransactionCommand.php',
'MetaMTAEmailTransactionCommandTestCase' => 'applications/metamta/command/__tests__/MetaMTAEmailTransactionCommandTestCase.php', 'MetaMTAEmailTransactionCommandTestCase' => 'applications/metamta/command/__tests__/MetaMTAEmailTransactionCommandTestCase.php',
'MetaMTAMailReceivedGarbageCollector' => 'applications/metamta/garbagecollector/MetaMTAMailReceivedGarbageCollector.php', 'MetaMTAMailReceivedGarbageCollector' => 'applications/metamta/garbagecollector/MetaMTAMailReceivedGarbageCollector.php',
@ -1407,6 +1405,7 @@ phutil_register_library_map(array(
'PHUITimelineEventView' => 'view/phui/PHUITimelineEventView.php', 'PHUITimelineEventView' => 'view/phui/PHUITimelineEventView.php',
'PHUITimelineExample' => 'applications/uiexample/examples/PHUITimelineExample.php', 'PHUITimelineExample' => 'applications/uiexample/examples/PHUITimelineExample.php',
'PHUITimelineView' => 'view/phui/PHUITimelineView.php', 'PHUITimelineView' => 'view/phui/PHUITimelineView.php',
'PHUITwoColumnView' => 'view/phui/PHUITwoColumnView.php',
'PHUITypeaheadExample' => 'applications/uiexample/examples/PHUITypeaheadExample.php', 'PHUITypeaheadExample' => 'applications/uiexample/examples/PHUITypeaheadExample.php',
'PHUIWorkboardView' => 'view/phui/PHUIWorkboardView.php', 'PHUIWorkboardView' => 'view/phui/PHUIWorkboardView.php',
'PHUIWorkpanelView' => 'view/phui/PHUIWorkpanelView.php', 'PHUIWorkpanelView' => 'view/phui/PHUIWorkpanelView.php',
@ -2258,6 +2257,7 @@ phutil_register_library_map(array(
'PhabricatorMailManagementShowOutboundWorkflow' => 'applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php', 'PhabricatorMailManagementShowOutboundWorkflow' => 'applications/metamta/management/PhabricatorMailManagementShowOutboundWorkflow.php',
'PhabricatorMailManagementVolumeWorkflow' => 'applications/metamta/management/PhabricatorMailManagementVolumeWorkflow.php', 'PhabricatorMailManagementVolumeWorkflow' => 'applications/metamta/management/PhabricatorMailManagementVolumeWorkflow.php',
'PhabricatorMailManagementWorkflow' => 'applications/metamta/management/PhabricatorMailManagementWorkflow.php', 'PhabricatorMailManagementWorkflow' => 'applications/metamta/management/PhabricatorMailManagementWorkflow.php',
'PhabricatorMailOutboundStatus' => 'applications/metamta/constants/PhabricatorMailOutboundStatus.php',
'PhabricatorMailReceiver' => 'applications/metamta/receiver/PhabricatorMailReceiver.php', 'PhabricatorMailReceiver' => 'applications/metamta/receiver/PhabricatorMailReceiver.php',
'PhabricatorMailReceiverTestCase' => 'applications/metamta/receiver/__tests__/PhabricatorMailReceiverTestCase.php', 'PhabricatorMailReceiverTestCase' => 'applications/metamta/receiver/__tests__/PhabricatorMailReceiverTestCase.php',
'PhabricatorMailReplyHandler' => 'applications/metamta/replyhandler/PhabricatorMailReplyHandler.php', 'PhabricatorMailReplyHandler' => 'applications/metamta/replyhandler/PhabricatorMailReplyHandler.php',
@ -3395,20 +3395,23 @@ phutil_register_library_map(array(
'PonderAnswerPHIDType' => 'applications/ponder/phid/PonderAnswerPHIDType.php', 'PonderAnswerPHIDType' => 'applications/ponder/phid/PonderAnswerPHIDType.php',
'PonderAnswerQuery' => 'applications/ponder/query/PonderAnswerQuery.php', 'PonderAnswerQuery' => 'applications/ponder/query/PonderAnswerQuery.php',
'PonderAnswerSaveController' => 'applications/ponder/controller/PonderAnswerSaveController.php', 'PonderAnswerSaveController' => 'applications/ponder/controller/PonderAnswerSaveController.php',
'PonderAnswerStatus' => 'applications/ponder/constants/PonderAnswerStatus.php',
'PonderAnswerTransaction' => 'applications/ponder/storage/PonderAnswerTransaction.php', 'PonderAnswerTransaction' => 'applications/ponder/storage/PonderAnswerTransaction.php',
'PonderAnswerTransactionComment' => 'applications/ponder/storage/PonderAnswerTransactionComment.php', 'PonderAnswerTransactionComment' => 'applications/ponder/storage/PonderAnswerTransactionComment.php',
'PonderAnswerTransactionQuery' => 'applications/ponder/query/PonderAnswerTransactionQuery.php', 'PonderAnswerTransactionQuery' => 'applications/ponder/query/PonderAnswerTransactionQuery.php',
'PonderAnswerView' => 'applications/ponder/view/PonderAnswerView.php',
'PonderConstants' => 'applications/ponder/constants/PonderConstants.php', 'PonderConstants' => 'applications/ponder/constants/PonderConstants.php',
'PonderController' => 'applications/ponder/controller/PonderController.php', 'PonderController' => 'applications/ponder/controller/PonderController.php',
'PonderDAO' => 'applications/ponder/storage/PonderDAO.php', 'PonderDAO' => 'applications/ponder/storage/PonderDAO.php',
'PonderDefaultViewCapability' => 'applications/ponder/capability/PonderDefaultViewCapability.php',
'PonderEditor' => 'applications/ponder/editor/PonderEditor.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', 'PonderQuestion' => 'applications/ponder/storage/PonderQuestion.php',
'PonderQuestionCommentController' => 'applications/ponder/controller/PonderQuestionCommentController.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', 'PonderQuestionEditController' => 'applications/ponder/controller/PonderQuestionEditController.php',
'PonderQuestionEditor' => 'applications/ponder/editor/PonderQuestionEditor.php', 'PonderQuestionEditor' => 'applications/ponder/editor/PonderQuestionEditor.php',
'PonderQuestionHasVotingUserEdgeType' => 'applications/ponder/edge/PonderQuestionHasVotingUserEdgeType.php',
'PonderQuestionHistoryController' => 'applications/ponder/controller/PonderQuestionHistoryController.php', 'PonderQuestionHistoryController' => 'applications/ponder/controller/PonderQuestionHistoryController.php',
'PonderQuestionListController' => 'applications/ponder/controller/PonderQuestionListController.php', 'PonderQuestionListController' => 'applications/ponder/controller/PonderQuestionListController.php',
'PonderQuestionMailReceiver' => 'applications/ponder/mail/PonderQuestionMailReceiver.php', 'PonderQuestionMailReceiver' => 'applications/ponder/mail/PonderQuestionMailReceiver.php',
@ -3427,12 +3430,9 @@ phutil_register_library_map(array(
'PonderSearchIndexer' => 'applications/ponder/search/PonderSearchIndexer.php', 'PonderSearchIndexer' => 'applications/ponder/search/PonderSearchIndexer.php',
'PonderTransactionFeedStory' => 'applications/ponder/feed/PonderTransactionFeedStory.php', 'PonderTransactionFeedStory' => 'applications/ponder/feed/PonderTransactionFeedStory.php',
'PonderVotableInterface' => 'applications/ponder/storage/PonderVotableInterface.php', 'PonderVotableInterface' => 'applications/ponder/storage/PonderVotableInterface.php',
'PonderVotableView' => 'applications/ponder/view/PonderVotableView.php',
'PonderVote' => 'applications/ponder/constants/PonderVote.php', 'PonderVote' => 'applications/ponder/constants/PonderVote.php',
'PonderVoteEditor' => 'applications/ponder/editor/PonderVoteEditor.php', 'PonderVoteEditor' => 'applications/ponder/editor/PonderVoteEditor.php',
'PonderVoteSaveController' => 'applications/ponder/controller/PonderVoteSaveController.php',
'PonderVotingUserHasAnswerEdgeType' => 'applications/ponder/edge/PonderVotingUserHasAnswerEdgeType.php', 'PonderVotingUserHasAnswerEdgeType' => 'applications/ponder/edge/PonderVotingUserHasAnswerEdgeType.php',
'PonderVotingUserHasQuestionEdgeType' => 'applications/ponder/edge/PonderVotingUserHasQuestionEdgeType.php',
'ProjectAddProjectsEmailCommand' => 'applications/project/command/ProjectAddProjectsEmailCommand.php', 'ProjectAddProjectsEmailCommand' => 'applications/project/command/ProjectAddProjectsEmailCommand.php',
'ProjectBoardTaskCard' => 'applications/project/view/ProjectBoardTaskCard.php', 'ProjectBoardTaskCard' => 'applications/project/view/ProjectBoardTaskCard.php',
'ProjectCanLockProjectsCapability' => 'applications/project/capability/ProjectCanLockProjectsCapability.php', 'ProjectCanLockProjectsCapability' => 'applications/project/capability/ProjectCanLockProjectsCapability.php',
@ -4001,7 +4001,6 @@ phutil_register_library_map(array(
'DifferentialFieldParseException' => 'Exception', 'DifferentialFieldParseException' => 'Exception',
'DifferentialFieldValidationException' => 'Exception', 'DifferentialFieldValidationException' => 'Exception',
'DifferentialFindConduitAPIMethod' => 'DifferentialConduitAPIMethod', 'DifferentialFindConduitAPIMethod' => 'DifferentialConduitAPIMethod',
'DifferentialFinishPostponedLintersConduitAPIMethod' => 'DifferentialConduitAPIMethod',
'DifferentialGetAllDiffsConduitAPIMethod' => 'DifferentialConduitAPIMethod', 'DifferentialGetAllDiffsConduitAPIMethod' => 'DifferentialConduitAPIMethod',
'DifferentialGetCommitMessageConduitAPIMethod' => 'DifferentialConduitAPIMethod', 'DifferentialGetCommitMessageConduitAPIMethod' => 'DifferentialConduitAPIMethod',
'DifferentialGetCommitPathsConduitAPIMethod' => 'DifferentialConduitAPIMethod', 'DifferentialGetCommitPathsConduitAPIMethod' => 'DifferentialConduitAPIMethod',
@ -4138,7 +4137,6 @@ phutil_register_library_map(array(
'DifferentialUnitStatus' => 'Phobject', 'DifferentialUnitStatus' => 'Phobject',
'DifferentialUnitTestResult' => 'Phobject', 'DifferentialUnitTestResult' => 'Phobject',
'DifferentialUpdateRevisionConduitAPIMethod' => 'DifferentialConduitAPIMethod', 'DifferentialUpdateRevisionConduitAPIMethod' => 'DifferentialConduitAPIMethod',
'DifferentialUpdateUnitResultsConduitAPIMethod' => 'DifferentialConduitAPIMethod',
'DifferentialViewPolicyField' => 'DifferentialCoreCustomField', 'DifferentialViewPolicyField' => 'DifferentialCoreCustomField',
'DiffusionAuditorDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'DiffusionAuditorDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'DiffusionAuditorsAddAuditorsHeraldAction' => 'DiffusionAuditorsHeraldAction', 'DiffusionAuditorsAddAuditorsHeraldAction' => 'DiffusionAuditorsHeraldAction',
@ -4789,6 +4787,7 @@ phutil_register_library_map(array(
'HeraldNotifyActionGroup' => 'HeraldActionGroup', 'HeraldNotifyActionGroup' => 'HeraldActionGroup',
'HeraldObjectTranscript' => 'Phobject', 'HeraldObjectTranscript' => 'Phobject',
'HeraldPholioMockAdapter' => 'HeraldAdapter', 'HeraldPholioMockAdapter' => 'HeraldAdapter',
'HeraldPonderQuestionAdapter' => 'HeraldAdapter',
'HeraldPreCommitAdapter' => 'HeraldAdapter', 'HeraldPreCommitAdapter' => 'HeraldAdapter',
'HeraldPreCommitContentAdapter' => 'HeraldPreCommitAdapter', 'HeraldPreCommitContentAdapter' => 'HeraldPreCommitAdapter',
'HeraldPreCommitRefAdapter' => 'HeraldPreCommitAdapter', 'HeraldPreCommitRefAdapter' => 'HeraldPreCommitAdapter',
@ -5014,12 +5013,11 @@ phutil_register_library_map(array(
'ManiphestTransactionSaveController' => 'ManiphestController', 'ManiphestTransactionSaveController' => 'ManiphestController',
'ManiphestUpdateConduitAPIMethod' => 'ManiphestConduitAPIMethod', 'ManiphestUpdateConduitAPIMethod' => 'ManiphestConduitAPIMethod',
'ManiphestView' => 'AphrontView', 'ManiphestView' => 'AphrontView',
'MetaMTAConstants' => 'Phobject',
'MetaMTAEmailTransactionCommand' => 'Phobject', 'MetaMTAEmailTransactionCommand' => 'Phobject',
'MetaMTAEmailTransactionCommandTestCase' => 'PhabricatorTestCase', 'MetaMTAEmailTransactionCommandTestCase' => 'PhabricatorTestCase',
'MetaMTAMailReceivedGarbageCollector' => 'PhabricatorGarbageCollector', 'MetaMTAMailReceivedGarbageCollector' => 'PhabricatorGarbageCollector',
'MetaMTAMailSentGarbageCollector' => 'PhabricatorGarbageCollector', 'MetaMTAMailSentGarbageCollector' => 'PhabricatorGarbageCollector',
'MetaMTAReceivedMailStatus' => 'MetaMTAConstants', 'MetaMTAReceivedMailStatus' => 'Phobject',
'MultimeterContext' => 'MultimeterDimension', 'MultimeterContext' => 'MultimeterDimension',
'MultimeterControl' => 'Phobject', 'MultimeterControl' => 'Phobject',
'MultimeterController' => 'PhabricatorController', 'MultimeterController' => 'PhabricatorController',
@ -5188,6 +5186,7 @@ phutil_register_library_map(array(
'PHUITimelineEventView' => 'AphrontView', 'PHUITimelineEventView' => 'AphrontView',
'PHUITimelineExample' => 'PhabricatorUIExample', 'PHUITimelineExample' => 'PhabricatorUIExample',
'PHUITimelineView' => 'AphrontView', 'PHUITimelineView' => 'AphrontView',
'PHUITwoColumnView' => 'AphrontTagView',
'PHUITypeaheadExample' => 'PhabricatorUIExample', 'PHUITypeaheadExample' => 'PhabricatorUIExample',
'PHUIWorkboardView' => 'AphrontTagView', 'PHUIWorkboardView' => 'AphrontTagView',
'PHUIWorkpanelView' => 'AphrontTagView', 'PHUIWorkpanelView' => 'AphrontTagView',
@ -6183,6 +6182,7 @@ phutil_register_library_map(array(
'PhabricatorMailManagementShowOutboundWorkflow' => 'PhabricatorMailManagementWorkflow', 'PhabricatorMailManagementShowOutboundWorkflow' => 'PhabricatorMailManagementWorkflow',
'PhabricatorMailManagementVolumeWorkflow' => 'PhabricatorMailManagementWorkflow', 'PhabricatorMailManagementVolumeWorkflow' => 'PhabricatorMailManagementWorkflow',
'PhabricatorMailManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorMailManagementWorkflow' => 'PhabricatorManagementWorkflow',
'PhabricatorMailOutboundStatus' => 'Phobject',
'PhabricatorMailReceiver' => 'Phobject', 'PhabricatorMailReceiver' => 'Phobject',
'PhabricatorMailReceiverTestCase' => 'PhabricatorTestCase', 'PhabricatorMailReceiverTestCase' => 'PhabricatorTestCase',
'PhabricatorMailReplyHandler' => 'Phobject', 'PhabricatorMailReplyHandler' => 'Phobject',
@ -7572,7 +7572,6 @@ phutil_register_library_map(array(
'PhabricatorPolicyInterface', 'PhabricatorPolicyInterface',
'PhabricatorFlaggableInterface', 'PhabricatorFlaggableInterface',
'PhabricatorSubscribableInterface', 'PhabricatorSubscribableInterface',
'PhabricatorTokenReceiverInterface',
'PhabricatorDestructibleInterface', 'PhabricatorDestructibleInterface',
), ),
'PonderAnswerCommentController' => 'PonderController', 'PonderAnswerCommentController' => 'PonderController',
@ -7583,18 +7582,23 @@ phutil_register_library_map(array(
'PonderAnswerPHIDType' => 'PhabricatorPHIDType', 'PonderAnswerPHIDType' => 'PhabricatorPHIDType',
'PonderAnswerQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PonderAnswerQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PonderAnswerSaveController' => 'PonderController', 'PonderAnswerSaveController' => 'PonderController',
'PonderAnswerStatus' => 'PonderConstants',
'PonderAnswerTransaction' => 'PhabricatorApplicationTransaction', 'PonderAnswerTransaction' => 'PhabricatorApplicationTransaction',
'PonderAnswerTransactionComment' => 'PhabricatorApplicationTransactionComment', 'PonderAnswerTransactionComment' => 'PhabricatorApplicationTransactionComment',
'PonderAnswerTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PonderAnswerTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
'PonderAnswerView' => 'AphrontTagView',
'PonderConstants' => 'Phobject', 'PonderConstants' => 'Phobject',
'PonderController' => 'PhabricatorController', 'PonderController' => 'PhabricatorController',
'PonderDAO' => 'PhabricatorLiskDAO', 'PonderDAO' => 'PhabricatorLiskDAO',
'PonderDefaultViewCapability' => 'PhabricatorPolicyCapability',
'PonderEditor' => 'PhabricatorApplicationTransactionEditor', 'PonderEditor' => 'PhabricatorApplicationTransactionEditor',
'PonderFooterView' => 'AphrontTagView',
'PonderHelpfulSaveController' => 'PonderController',
'PonderModerateCapability' => 'PhabricatorPolicyCapability',
'PonderQuestion' => array( 'PonderQuestion' => array(
'PonderDAO', 'PonderDAO',
'PhabricatorApplicationTransactionInterface', 'PhabricatorApplicationTransactionInterface',
'PhabricatorMarkupInterface', 'PhabricatorMarkupInterface',
'PonderVotableInterface',
'PhabricatorSubscribableInterface', 'PhabricatorSubscribableInterface',
'PhabricatorFlaggableInterface', 'PhabricatorFlaggableInterface',
'PhabricatorPolicyInterface', 'PhabricatorPolicyInterface',
@ -7604,11 +7608,8 @@ phutil_register_library_map(array(
'PhabricatorSpacesInterface', 'PhabricatorSpacesInterface',
), ),
'PonderQuestionCommentController' => 'PonderController', 'PonderQuestionCommentController' => 'PonderController',
'PonderQuestionDefaultEditCapability' => 'PhabricatorPolicyCapability',
'PonderQuestionDefaultViewCapability' => 'PhabricatorPolicyCapability',
'PonderQuestionEditController' => 'PonderController', 'PonderQuestionEditController' => 'PonderController',
'PonderQuestionEditor' => 'PonderEditor', 'PonderQuestionEditor' => 'PonderEditor',
'PonderQuestionHasVotingUserEdgeType' => 'PhabricatorEdgeType',
'PonderQuestionHistoryController' => 'PonderController', 'PonderQuestionHistoryController' => 'PonderController',
'PonderQuestionListController' => 'PonderController', 'PonderQuestionListController' => 'PonderController',
'PonderQuestionMailReceiver' => 'PhabricatorObjectMailReceiver', 'PonderQuestionMailReceiver' => 'PhabricatorObjectMailReceiver',
@ -7626,12 +7627,9 @@ phutil_register_library_map(array(
'PonderSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PonderSchemaSpec' => 'PhabricatorConfigSchemaSpec',
'PonderSearchIndexer' => 'PhabricatorSearchDocumentIndexer', 'PonderSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
'PonderTransactionFeedStory' => 'PhabricatorApplicationTransactionFeedStory', 'PonderTransactionFeedStory' => 'PhabricatorApplicationTransactionFeedStory',
'PonderVotableView' => 'AphrontView',
'PonderVote' => 'PonderConstants', 'PonderVote' => 'PonderConstants',
'PonderVoteEditor' => 'PhabricatorEditor', 'PonderVoteEditor' => 'PhabricatorEditor',
'PonderVoteSaveController' => 'PonderController',
'PonderVotingUserHasAnswerEdgeType' => 'PhabricatorEdgeType', 'PonderVotingUserHasAnswerEdgeType' => 'PhabricatorEdgeType',
'PonderVotingUserHasQuestionEdgeType' => 'PhabricatorEdgeType',
'ProjectAddProjectsEmailCommand' => 'MetaMTAEmailTransactionCommand', 'ProjectAddProjectsEmailCommand' => 'MetaMTAEmailTransactionCommand',
'ProjectBoardTaskCard' => 'Phobject', 'ProjectBoardTaskCard' => 'Phobject',
'ProjectCanLockProjectsCapability' => 'PhabricatorPolicyCapability', 'ProjectCanLockProjectsCapability' => 'PhabricatorPolicyCapability',

View file

@ -3,9 +3,9 @@
final class PhabricatorConduitTestCase extends PhabricatorTestCase { final class PhabricatorConduitTestCase extends PhabricatorTestCase {
public function testConduitMethods() { public function testConduitMethods() {
$methods = id(new PhutilSymbolLoader()) $methods = id(new PhutilClassMapQuery())
->setAncestorClass('ConduitAPIMethod') ->setAncestorClass('ConduitAPIMethod')
->loadObjects(); ->execute();
// We're just looking for a side effect of ConduitCall construction // We're just looking for a side effect of ConduitCall construction
// here: it will throw if any methods define reserved parameter names. // here: it will throw if any methods define reserved parameter names.

View file

@ -246,7 +246,8 @@ abstract class AphrontApplicationConfiguration extends Phobject {
if ($response instanceof AphrontWebpageResponse) { if ($response instanceof AphrontWebpageResponse) {
echo phutil_tag( echo phutil_tag(
'div', 'div',
array('style' => array(
'style' =>
'background: #eeddff;'. 'background: #eeddff;'.
'white-space: pre-wrap;'. 'white-space: pre-wrap;'.
'z-index: 200000;'. 'z-index: 200000;'.

View file

@ -10,7 +10,6 @@ final class PhabricatorBadgesTransaction
const TYPE_STATUS = 'badges:status'; const TYPE_STATUS = 'badges:status';
const TYPE_FLAVOR = 'badges:flavor'; const TYPE_FLAVOR = 'badges:flavor';
const MAILTAG_NAME = 'badges:name';
const MAILTAG_DETAILS = 'badges:details'; const MAILTAG_DETAILS = 'badges:details';
const MAILTAG_COMMENT = 'badges:comment'; const MAILTAG_COMMENT = 'badges:comment';
const MAILTAG_OTHER = 'badges:other'; const MAILTAG_OTHER = 'badges:other';

View file

@ -17,14 +17,12 @@ final class CelerityPhabricatorResourceController
return CelerityResourceMap::getNamedInstance($this->library); return CelerityResourceMap::getNamedInstance($this->library);
} }
public function willProcessRequest(array $data) { public function handleRequest(AphrontRequest $request) {
$this->path = $data['path']; $this->path = $request->getURIData('path');
$this->hash = $data['hash']; $this->hash = $request->getURIData('hash');
$this->library = $data['library']; $this->library = $request->getURIData('library');
$this->postprocessorKey = idx($data, 'postprocessor'); $this->postprocessorKey = $request->getURIData('postprocessor');
}
public function processRequest() {
// Check that the resource library exists before trying to serve resources // Check that the resource library exists before trying to serve resources
// from it. // from it.
try { try {

View file

@ -139,34 +139,10 @@ abstract class ConduitAPIMethod
} }
public static function loadAllConduitMethods() { public static function loadAllConduitMethods() {
static $method_map = null; return id(new PhutilClassMapQuery())
if ($method_map === null) {
$methods = id(new PhutilSymbolLoader())
->setAncestorClass(__CLASS__) ->setAncestorClass(__CLASS__)
->loadObjects(); ->setUniqueMethod('getAPIMethodName')
->execute();
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;
} }
public static function getConduitMethod($method_name) { public static function getConduitMethod($method_name) {

View file

@ -19,10 +19,9 @@ final class ConduitQueryConduitAPIMethod extends ConduitAPIMethod {
} }
protected function execute(ConduitAPIRequest $request) { protected function execute(ConduitAPIRequest $request) {
$classes = id(new PhutilSymbolLoader()) $classes = id(new PhutilClassMapQuery())
->setAncestorClass('ConduitAPIMethod') ->setAncestorClass('ConduitAPIMethod')
->setType('class') ->execute();
->loadObjects();
$names_to_params = array(); $names_to_params = array();
foreach ($classes as $class) { foreach ($classes as $class) {

View file

@ -47,14 +47,10 @@ final class PhabricatorConduitMethodQuery
} }
private function getAllMethods() { private function getAllMethods() {
static $methods; return id(new PhutilClassMapQuery())
if ($methods === null) {
$methods = id(new PhutilSymbolLoader())
->setAncestorClass('ConduitAPIMethod') ->setAncestorClass('ConduitAPIMethod')
->loadObjects(); ->setSortMethod('getSortOrder')
$methods = msort($methods, 'getSortOrder'); ->execute();
}
return $methods;
} }
private function filterMethods(array $methods) { private function filterMethods(array $methods) {

View file

@ -9,9 +9,9 @@ final class PhabricatorConfigCoreSchemaSpec
public function buildSchemata() { public function buildSchemata() {
// Build all Lisk table schemata. // Build all Lisk table schemata.
$lisk_objects = id(new PhutilSymbolLoader()) $lisk_objects = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorLiskDAO') ->setAncestorClass('PhabricatorLiskDAO')
->loadObjects(); ->execute();
$counters = array(); $counters = array();
foreach ($lisk_objects as $object) { foreach ($lisk_objects as $object) {

View file

@ -155,9 +155,9 @@ final class PhabricatorConfigSchemaQuery extends Phobject {
$databases = $this->getDatabaseNames(); $databases = $this->getDatabaseNames();
$info = $this->getAPI()->getCharsetInfo(); $info = $this->getAPI()->getCharsetInfo();
$specs = id(new PhutilSymbolLoader()) $specs = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorConfigSchemaSpec') ->setAncestorClass('PhabricatorConfigSchemaSpec')
->loadObjects(); ->execute();
$server_schema = new PhabricatorConfigServerSchema(); $server_schema = new PhabricatorConfigServerSchema();
foreach ($specs as $spec) { foreach ($specs as $spec) {

View file

@ -7,7 +7,8 @@ abstract class ConpherenceTestCase extends PhabricatorTestCase {
ConpherenceThread $conpherence, ConpherenceThread $conpherence,
array $participant_phids) { array $participant_phids) {
$xactions = array(id(new ConpherenceTransaction()) $xactions = array(
id(new ConpherenceTransaction())
->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS) ->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS)
->setNewValue(array('+' => $participant_phids)), ->setNewValue(array('+' => $participant_phids)),
); );
@ -23,7 +24,8 @@ abstract class ConpherenceTestCase extends PhabricatorTestCase {
ConpherenceThread $conpherence, ConpherenceThread $conpherence,
array $participant_phids) { array $participant_phids) {
$xactions = array(id(new ConpherenceTransaction()) $xactions = array(
id(new ConpherenceTransaction())
->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS) ->setTransactionType(ConpherenceTransaction::TYPE_PARTICIPANTS)
->setNewValue(array('-' => $participant_phids)), ->setNewValue(array('-' => $participant_phids)),
); );

View file

@ -6,19 +6,13 @@ final class DarkConsoleCore extends Phobject {
const STORAGE_VERSION = 1; const STORAGE_VERSION = 1;
public function __construct() { public function __construct() {
$symbols = id(new PhutilSymbolLoader()) $this->plugins = id(new PhutilClassMapQuery())
->setType('class')
->setAncestorClass('DarkConsolePlugin') ->setAncestorClass('DarkConsolePlugin')
->selectAndLoadSymbols(); ->execute();
foreach ($symbols as $symbol) { foreach ($this->plugins as $plugin) {
$plugin = newv($symbol['name'], array());
if (!$plugin->shouldStartup()) {
continue;
}
$plugin->setConsoleCore($this); $plugin->setConsoleCore($this);
$plugin->didStartup(); $plugin->didStartup();
$this->plugins[$symbol['name']] = $plugin;
} }
} }

View file

@ -62,10 +62,6 @@ abstract class DarkConsolePlugin extends Phobject {
return $this->getRequest()->getRequestURI(); return $this->getRequest()->getRequestURI();
} }
public function shouldStartup() {
return true;
}
public function didStartup() { public function didStartup() {
return null; return null;
} }

View file

@ -3,16 +3,10 @@
final class PhabricatorDaemonLogEventViewController final class PhabricatorDaemonLogEventViewController
extends PhabricatorDaemonController { extends PhabricatorDaemonController {
private $id; public function handleRequest(AphrontRequest $request) {
$id = $request->getURIData('id');
public function willProcessRequest(array $data) { $event = id(new PhabricatorDaemonLogEvent())->load($id);
$this->id = $data['id'];
}
public function processRequest() {
$request = $this->getRequest();
$event = id(new PhabricatorDaemonLogEvent())->load($this->id);
if (!$event) { if (!$event) {
return new Aphront404Response(); return new Aphront404Response();
} }

View file

@ -3,9 +3,8 @@
final class PhabricatorDaemonLogListController final class PhabricatorDaemonLogListController
extends PhabricatorDaemonController { extends PhabricatorDaemonController {
public function processRequest() { public function handleRequest(AphrontRequest $request) {
$request = $this->getRequest(); $viewer = $request->getViewer();
$viewer = $request->getUser();
$pager = new AphrontCursorPagerView(); $pager = new AphrontCursorPagerView();
$pager->readFromRequest($request); $pager->readFromRequest($request);

View file

@ -3,19 +3,13 @@
final class PhabricatorDaemonLogViewController final class PhabricatorDaemonLogViewController
extends PhabricatorDaemonController { extends PhabricatorDaemonController {
private $id; public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
public function willProcessRequest(array $data) { $id = $request->getURIData('id');
$this->id = $data['id'];
}
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$log = id(new PhabricatorDaemonLogQuery()) $log = id(new PhabricatorDaemonLogQuery())
->setViewer($user) ->setViewer($viewer)
->withIDs(array($this->id)) ->withIDs(array($id))
->setAllowStatusWrites(true) ->setAllowStatusWrites(true)
->executeOne(); ->executeOne();
if (!$log) { if (!$log) {
@ -76,7 +70,7 @@ final class PhabricatorDaemonLogViewController
$properties = $this->buildPropertyListView($log); $properties = $this->buildPropertyListView($log);
$event_view = id(new PhabricatorDaemonLogEventsView()) $event_view = id(new PhabricatorDaemonLogEventsView())
->setUser($user) ->setUser($viewer)
->setEvents($events); ->setEvents($events);
$event_panel = new PHUIObjectBoxView(); $event_panel = new PHUIObjectBoxView();

View file

@ -3,20 +3,14 @@
final class PhabricatorWorkerTaskDetailController final class PhabricatorWorkerTaskDetailController
extends PhabricatorDaemonController { extends PhabricatorDaemonController {
private $id; public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$id = $request->getURIData('id');
public function willProcessRequest(array $data) { $task = id(new PhabricatorWorkerActiveTask())->load($id);
$this->id = $data['id'];
}
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$task = id(new PhabricatorWorkerActiveTask())->load($this->id);
if (!$task) { if (!$task) {
$tasks = id(new PhabricatorWorkerArchiveTaskQuery()) $tasks = id(new PhabricatorWorkerArchiveTaskQuery())
->withIDs(array($this->id)) ->withIDs(array($id))
->execute(); ->execute();
$task = reset($tasks); $task = reset($tasks);
} }
@ -155,9 +149,9 @@ final class PhabricatorWorkerTaskDetailController
$worker = $task->getWorkerInstance(); $worker = $task->getWorkerInstance();
$data = $worker->renderForDisplay($viewer); $data = $worker->renderForDisplay($viewer);
$view->addProperty( if ($data !== null) {
pht('Data'), $view->addProperty(pht('Data'), $data);
$data); }
return $view; return $view;
} }

View file

@ -6,8 +6,7 @@ abstract class PhabricatorDaemonManagementWorkflow
private $runDaemonsAsUser = null; private $runDaemonsAsUser = null;
final protected function loadAvailableDaemonClasses() { final protected function loadAvailableDaemonClasses() {
$loader = new PhutilSymbolLoader(); return id(new PhutilSymbolLoader())
return $loader
->setAncestorClass('PhutilDaemon') ->setAncestorClass('PhutilDaemon')
->setConcreteOnly(true) ->setConcreteOnly(true)
->selectSymbolsWithoutLoading(); ->selectSymbolsWithoutLoading();

View file

@ -3,16 +3,10 @@
final class PhabricatorDashboardManageController final class PhabricatorDashboardManageController
extends PhabricatorDashboardController { 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.'/'); $dashboard_uri = $this->getApplicationURI('view/'.$id.'/');
// TODO: This UI should drop a lot of capabilities if the user can't // 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()) $dashboard = id(new PhabricatorDashboardQuery())
->setViewer($viewer) ->setViewer($viewer)
->withIDs(array($this->id)) ->withIDs(array($id))
->needPanels(true) ->needPanels(true)
->executeOne(); ->executeOne();
if (!$dashboard) { if (!$dashboard) {

View file

@ -12,11 +12,11 @@ final class PhabricatorDashboardPanelSearchApplicationCustomField
} }
public function renderEditControl(array $handles) { public function renderEditControl(array $handles) {
$engines = id(new PhutilClassMapQuery())
$engines = id(new PhutilSymbolLoader())
->setAncestorClass('PhabricatorApplicationSearchEngine') ->setAncestorClass('PhabricatorApplicationSearchEngine')
->loadObjects(); ->setFilterMethod('canUseInPanelContext')
$engines = mfilter($engines, 'canUseInPanelContext'); ->execute();
$all_apps = id(new PhabricatorApplicationQuery()) $all_apps = id(new PhabricatorApplicationQuery())
->setViewer($this->getViewer()) ->setViewer($this->getViewer())
->withUnlisted(false) ->withUnlisted(false)

View file

@ -12,11 +12,10 @@ final class PhabricatorDashboardPanelSearchQueryCustomField
} }
public function renderEditControl(array $handles) { public function renderEditControl(array $handles) {
$engines = id(new PhutilClassMapQuery())
$engines = id(new PhutilSymbolLoader())
->setAncestorClass('PhabricatorApplicationSearchEngine') ->setAncestorClass('PhabricatorApplicationSearchEngine')
->loadObjects(); ->setFilterMethod('canUseInPanelContext')
$engines = mfilter($engines, 'canUseInPanelContext'); ->execute();
$value = $this->getFieldValue(); $value = $this->getFieldValue();

View file

@ -143,7 +143,8 @@ final class DifferentialCreateDiffConduitAPIMethod
'unitStatus' => $unit_status, 'unitStatus' => $unit_status,
); );
$xactions = array(id(new DifferentialTransaction()) $xactions = array(
id(new DifferentialTransaction())
->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE) ->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE)
->setNewValue($diff_data_dict), ->setNewValue($diff_data_dict),
); );

View file

@ -51,7 +51,8 @@ final class DifferentialCreateRawDiffConduitAPIMethod
'unitStatus' => DifferentialUnitStatus::UNIT_SKIP, 'unitStatus' => DifferentialUnitStatus::UNIT_SKIP,
); );
$xactions = array(id(new DifferentialTransaction()) $xactions = array(
id(new DifferentialTransaction())
->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE) ->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE)
->setNewValue($diff_data_dict), ->setNewValue($diff_data_dict),
); );

View file

@ -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();
}
}

View file

@ -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) { protected function execute(ConduitAPIRequest $request) {
$diff_id = $request->getValue('diff_id'); $diff_id = $request->getValue('diff_id');
$name = $request->getValue('name'); $name = $request->getValue('name');
$data = json_decode($request->getValue('data'), true); $data = json_decode($request->getValue('data'), true);
self::updateDiffProperty($diff_id, $name, $data); 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) { private static function updateDiffProperty($diff_id, $name, $data) {

View file

@ -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();
}
}

View file

@ -127,29 +127,32 @@ final class DifferentialChangesetViewController extends DifferentialController {
$changeset = $choice; $changeset = $choice;
} }
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; $coverage = null;
if ($right && $right->getDiffID()) { if ($right_new) {
$unit = id(new DifferentialDiffProperty())->loadOneWhere( $coverage = $this->loadCoverage($right);
'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);
}
} }
$spec = $request->getStr('range'); $spec = $request->getStr('range');
@ -248,15 +251,19 @@ final class DifferentialChangesetViewController extends DifferentialController {
->setMask($mask); ->setMask($mask);
if ($request->isAjax()) { 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(); $mcov = $parser->renderModifiedCoverage();
$coverage = array( $coverage_data = array(
'differential-mcoverage-'.md5($changeset->getFilename()) => $mcov, 'differential-mcoverage-'.md5($changeset->getFilename()) => $mcov,
); );
return id(new PhabricatorChangesetResponse()) return id(new PhabricatorChangesetResponse())
->setRenderedChangeset($parser->renderChangeset()) ->setRenderedChangeset($rendered_changeset)
->setCoverage($coverage) ->setCoverage($coverage_data)
->setUndoTemplates($parser->getRenderer()->renderUndoTemplates()); ->setUndoTemplates($parser->getRenderer()->renderUndoTemplates());
} }
@ -356,33 +363,62 @@ final class DifferentialChangesetViewController extends DifferentialController {
} }
private function buildLintInlineComments($changeset) { private function buildLintInlineComments($changeset) {
$lint = id(new DifferentialDiffProperty())->loadOneWhere( $diff = $changeset->getDiff();
'diffID = %d AND name = %s',
$changeset->getDiffID(), $target_phids = $diff->getBuildTargetPHIDs();
'arc:lint'); if (!$target_phids) {
if (!$lint) {
return array(); 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(); $inlines = array();
foreach ($lint as $msg) { foreach ($messages as $message) {
if ($msg['path'] != $changeset->getFilename()) { $description = $message->getProperty('description');
continue; $description = '%%%'.$description.'%%%';
}
$inline = new DifferentialInlineComment();
$inline->setChangesetID($changeset->getID());
$inline->setIsNewFile(1);
$inline->setSyntheticAuthor(pht('Lint: %s', $msg['name']));
$inline->setLineNumber($msg['line']);
$inline->setLineLength(0);
$inline->setContent('%%%'.$msg['description'].'%%%'); $inlines[] = id(clone $template)
->setSyntheticAuthor(pht('Lint: %s', $message->getName()))
$inlines[] = $inline; ->setLineNumber($message->getLine())
->setContent($description);
} }
return $inlines; 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);
}
} }

View file

@ -29,6 +29,17 @@ final class DifferentialDiffViewController extends DifferentialController {
->setURI('/D'.$diff->getRevisionID().'?id='.$diff->getID()); ->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? // TODO: implement optgroup support in AphrontFormSelectControl?
$select = array(); $select = array();
$select[] = hsprintf('<optgroup label="%s">', pht('Create New Revision')); $select[] = hsprintf('<optgroup label="%s">', pht('Create New Revision'));
@ -108,7 +119,7 @@ final class DifferentialDiffViewController extends DifferentialController {
$table_of_contents = id(new DifferentialDiffTableOfContentsView()) $table_of_contents = id(new DifferentialDiffTableOfContentsView())
->setChangesets($changesets) ->setChangesets($changesets)
->setVisibleChangesets($changesets) ->setVisibleChangesets($changesets)
->setUnitTestData(idx($props, 'arc:unit', array())); ->setCoverageMap($diff->loadCoverageMap($viewer));
$refs = array(); $refs = array();
foreach ($changesets as $changeset) { foreach ($changesets as $changeset) {

View file

@ -191,16 +191,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
$visible_changesets[$changeset_id] = $changesets[$changeset_id]; $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 { } else {
$warning = null; $warning = null;
$visible_changesets = $changesets; $visible_changesets = $changesets;
@ -363,7 +353,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
$toc_view->setChangesets($changesets); $toc_view->setChangesets($changesets);
$toc_view->setVisibleChangesets($visible_changesets); $toc_view->setVisibleChangesets($visible_changesets);
$toc_view->setRenderingReferences($rendering_references); $toc_view->setRenderingReferences($rendering_references);
$toc_view->setUnitTestData(idx($props, 'arc:unit', array())); $toc_view->setCoverageMap($target->loadCoverageMap($user));
if ($repository) { if ($repository) {
$toc_view->setRepository($repository); $toc_view->setRepository($repository);
} }

View file

@ -29,20 +29,11 @@ abstract class DifferentialHarbormasterField
$diff->attachProperty($key, idx($properties, $key)); $diff->attachProperty($key, idx($properties, $key));
} }
$messages = array(); $target_phids = $diff->getBuildTargetPHIDs();
$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) { if ($target_phids) {
$messages = $this->loadHarbormasterTargetMessages($target_phids); $messages = $this->loadHarbormasterTargetMessages($target_phids);
} } else {
$messages = array();
} }
if (!$messages) { if (!$messages) {

View file

@ -37,9 +37,10 @@ final class DifferentialLandingActionMenuEventListener
return null; return null;
} }
$strategies = id(new PhutilSymbolLoader()) $strategies = id(new PhutilClassMapQuery())
->setAncestorClass('DifferentialLandingStrategy') ->setAncestorClass('DifferentialLandingStrategy')
->loadObjects(); ->execute();
foreach ($strategies as $strategy) { foreach ($strategies as $strategy) {
$viewer = $event->getUser(); $viewer = $event->getUser();
$action = $strategy->createMenuItem($viewer, $revision, $repository); $action = $strategy->createMenuItem($viewer, $revision, $repository);

View file

@ -603,9 +603,9 @@ final class DifferentialHunkParser extends Phobject {
$start = $start - $add_context; $start = $start - $add_context;
$end = $end + $add_context; $end = $end + $add_context;
$hunk_content = array(); $hunk_content = array();
$hunk_pos = array( '-' => 0, '+' => 0 ); $hunk_pos = array('-' => 0, '+' => 0);
$hunk_offset = array( '-' => null, '+' => null ); $hunk_offset = array('-' => null, '+' => null);
$hunk_last = array( '-' => null, '+' => null ); $hunk_last = array('-' => null, '+' => null);
foreach (explode("\n", $hunk->getChanges()) as $line) { foreach (explode("\n", $hunk->getChanges()) as $line) {
$in_common = strncmp($line, ' ', 1) === 0; $in_common = strncmp($line, ' ', 1) === 0;
$in_old = strncmp($line, '-', 1) === 0 || $in_common; $in_old = strncmp($line, '-', 1) === 0 || $in_common;

View file

@ -331,6 +331,47 @@ final class DifferentialDiff
return $this->assertAttached($this->buildable); 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 )----------------------------------------- */ /* -( PhabricatorPolicyInterface )----------------------------------------- */

View file

@ -10,7 +10,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
private $renderURI = '/differential/changeset/'; private $renderURI = '/differential/changeset/';
private $revisionID; private $revisionID;
private $whitespace; private $whitespace;
private $unitTestData; private $coverageMap;
public function setChangesets($changesets) { public function setChangesets($changesets) {
$this->changesets = $changesets; $this->changesets = $changesets;
@ -37,8 +37,8 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
return $this; return $this;
} }
public function setUnitTestData($unit_test_data) { public function setCoverageMap(array $coverage_map) {
$this->unitTestData = $unit_test_data; $this->coverageMap = $coverage_map;
return $this; return $this;
} }
@ -60,23 +60,6 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
$rows = array(); $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; $changesets = $this->changesets;
$paths = array(); $paths = array();
foreach ($changesets as $id => $changeset) { foreach ($changesets as $id => $changeset) {
@ -144,7 +127,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
'M'); 'M');
$fname = $changeset->getFilename(); $fname = $changeset->getFilename();
$cov = $this->renderCoverage($coverage, $fname); $cov = $this->renderCoverage($this->coverageMap, $fname);
if ($cov === null) { if ($cov === null) {
$mcov = $cov = phutil_tag('em', array(), '-'); $mcov = $cov = phutil_tag('em', array(), '-');
} else { } else {

View file

@ -64,9 +64,10 @@ final class DiffusionSymbolController extends DiffusionController {
$external_query->withLanguages(array($request->getStr('lang'))); $external_query->withLanguages(array($request->getStr('lang')));
} }
$external_sources = id(new PhutilSymbolLoader()) $external_sources = id(new PhutilClassMapQuery())
->setAncestorClass('DiffusionExternalSymbolsSource') ->setAncestorClass('DiffusionExternalSymbolsSource')
->loadObjects(); ->execute();
$results = array($symbols); $results = array($symbols);
foreach ($external_sources as $source) { foreach ($external_sources as $source) {
$results[] = $source->executeQuery($external_query); $results[] = $source->executeQuery($external_query);

View file

@ -414,10 +414,9 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow {
$version['atom'] = DivinerAtom::getAtomSerializationVersion(); $version['atom'] = DivinerAtom::getAtomSerializationVersion();
$version['rules'] = $this->getRules(); $version['rules'] = $this->getRules();
$atomizers = id(new PhutilSymbolLoader()) $atomizers = id(new PhutilClassMapQuery())
->setAncestorClass('DivinerAtomizer') ->setAncestorClass('DivinerAtomizer')
->setConcreteOnly(true) ->execute();
->selectAndLoadSymbols();
$atomizer_versions = array(); $atomizer_versions = array();
foreach ($atomizers as $atomizer) { foreach ($atomizers as $atomizer) {

View file

@ -2,9 +2,8 @@
final class DoorkeeperTagsController extends PhabricatorController { final class DoorkeeperTagsController extends PhabricatorController {
public function processRequest() { public function handleRequest(AphrontRequest $request) {
$request = $this->getRequest(); $viewer = $request->getViewer();
$viewer = $request->getUser();
$tags = $request->getStr('tags'); $tags = $request->getStr('tags');
try { try {

View file

@ -88,14 +88,12 @@ final class DoorkeeperImportEngine extends Phobject {
} }
if (!$this->localOnly) { if (!$this->localOnly) {
$bridges = id(new PhutilSymbolLoader()) $bridges = id(new PhutilClassMapQuery())
->setAncestorClass('DoorkeeperBridge') ->setAncestorClass('DoorkeeperBridge')
->loadObjects(); ->setFilterMethod('isEnabled')
->execute();
foreach ($bridges as $key => $bridge) { foreach ($bridges as $key => $bridge) {
if (!$bridge->isEnabled()) {
unset($bridges[$key]);
}
$bridge->setViewer($viewer); $bridge->setViewer($viewer);
$bridge->setThrowOnMissingLink($this->throwOnMissingLink); $bridge->setThrowOnMissingLink($this->throwOnMissingLink);
} }

View file

@ -120,9 +120,9 @@ final class PhabricatorAsanaConfigOptions
$viewer = $request->getUser(); $viewer = $request->getUser();
$publishers = id(new PhutilSymbolLoader()) $publishers = id(new PhutilClassMapQuery())
->setAncestorClass('DoorkeeperFeedStoryPublisher') ->setAncestorClass('DoorkeeperFeedStoryPublisher')
->loadObjects(); ->execute();
$out = array(); $out = array();
$out[] = pht( $out[] = pht(

View file

@ -125,9 +125,9 @@ abstract class DoorkeeperFeedWorker extends FeedPushWorker {
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$object = $this->getStoryObject(); $object = $this->getStoryObject();
$publishers = id(new PhutilSymbolLoader()) $publishers = id(new PhutilClassMapQuery())
->setAncestorClass('DoorkeeperFeedStoryPublisher') ->setAncestorClass('DoorkeeperFeedStoryPublisher')
->loadObjects(); ->execute();
foreach ($publishers as $publisher) { foreach ($publishers as $publisher) {
if (!$publisher->canPublishStory($story, $object)) { if (!$publisher->canPublishStory($story, $object)) {

View file

@ -23,6 +23,7 @@ final class FeedPublisherWorker extends FeedPushWorker {
); );
// Find and schedule all the enabled Doorkeeper publishers. // Find and schedule all the enabled Doorkeeper publishers.
// TODO: Use PhutilClassMapQuery?
$doorkeeper_workers = id(new PhutilSymbolLoader()) $doorkeeper_workers = id(new PhutilSymbolLoader())
->setAncestorClass('DoorkeeperFeedWorker') ->setAncestorClass('DoorkeeperFeedWorker')
->loadObjects($argv); ->loadObjects($argv);

View file

@ -882,18 +882,9 @@ final class PhabricatorFile extends PhabricatorFileDAO
} }
public static function buildAllEngines() { public static function buildAllEngines() {
$engines = id(new PhutilSymbolLoader()) return id(new PhutilClassMapQuery())
->setType('class')
->setConcreteOnly(true)
->setAncestorClass('PhabricatorFileStorageEngine') ->setAncestorClass('PhabricatorFileStorageEngine')
->selectAndLoadSymbols(); ->execute();
$results = array();
foreach ($engines as $engine_class) {
$results[] = newv($engine_class['name'], array());
}
return $results;
} }
public function getViewableMimeType() { public function getViewableMimeType() {

View file

@ -100,11 +100,13 @@ final class PhabricatorFlagSearchEngine
} }
private function getObjectFilterOptions() { private function getObjectFilterOptions() {
$objects = id(new PhutilSymbolLoader()) $objects = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorFlaggableInterface') ->setAncestorClass('PhabricatorFlaggableInterface')
->loadObjects(); ->execute();
$all_types = PhabricatorPHIDType::getAllTypes(); $all_types = PhabricatorPHIDType::getAllTypes();
$options = array(); $options = array();
foreach ($objects as $object) { foreach ($objects as $object) {
$phid = $object->generatePHID(); $phid = $object->generatePHID();
$phid_type = phid_get_type($phid); $phid_type = phid_get_type($phid);

View file

@ -172,34 +172,26 @@ final class HarbormasterBuildViewController
} }
$details = $build_target->getDetails(); $details = $build_target->getDetails();
if ($details) {
$properties = new PHUIPropertyListView(); $properties = new PHUIPropertyListView();
foreach ($details as $key => $value) { foreach ($details as $key => $value) {
$properties->addProperty($key, $value); $properties->addProperty($key, $value);
} }
$target_box->addPropertyList($properties, pht('Configuration')); $target_box->addPropertyList($properties, pht('Configuration'));
}
$variables = $build_target->getVariables(); $variables = $build_target->getVariables();
if ($variables) {
$properties = new PHUIPropertyListView(); $properties = new PHUIPropertyListView();
$properties->addRawContent($this->buildProperties($variables)); $properties->addRawContent($this->buildProperties($variables));
$target_box->addPropertyList($properties, pht('Variables')); $target_box->addPropertyList($properties, pht('Variables'));
}
$artifacts = $this->buildArtifacts($build_target); $artifacts = $this->buildArtifacts($build_target);
if ($artifacts) {
$properties = new PHUIPropertyListView(); $properties = new PHUIPropertyListView();
$properties->addRawContent($artifacts); $properties->addRawContent($artifacts);
$target_box->addPropertyList($properties, pht('Artifacts')); $target_box->addPropertyList($properties, pht('Artifacts'));
}
$build_messages = idx($messages, $build_target->getPHID(), array()); $build_messages = idx($messages, $build_target->getPHID(), array());
if ($build_messages) {
$properties = new PHUIPropertyListView(); $properties = new PHUIPropertyListView();
$properties->addRawContent($this->buildMessages($build_messages)); $properties->addRawContent($this->buildMessages($build_messages));
$target_box->addPropertyList($properties, pht('Messages')); $target_box->addPropertyList($properties, pht('Messages'));
}
$properties = new PHUIPropertyListView(); $properties = new PHUIPropertyListView();
$properties->addProperty( $properties->addProperty(
@ -243,11 +235,8 @@ final class HarbormasterBuildViewController
->withBuildTargetPHIDs(array($build_target->getPHID())) ->withBuildTargetPHIDs(array($build_target->getPHID()))
->execute(); ->execute();
if (count($artifacts) === 0) {
return null;
}
$list = id(new PHUIObjectItemListView()) $list = id(new PHUIObjectItemListView())
->setNoDataString(pht('This target has no associated artifacts.'))
->setFlush(true); ->setFlush(true);
foreach ($artifacts as $artifact) { foreach ($artifacts as $artifact) {

View file

@ -22,6 +22,15 @@ final class HarbormasterPlanRunController extends HarbormasterController {
return new Aphront404Response(); 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; $e_name = true;
$v_name = null; $v_name = null;
@ -65,7 +74,6 @@ final class HarbormasterPlanRunController extends HarbormasterController {
} }
$title = pht('Run Build Plan Manually'); $title = pht('Run Build Plan Manually');
$cancel_uri = $this->getApplicationURI("plan/{$plan_id}/");
$save_button = pht('Run Plan Manually'); $save_button = pht('Run Plan Manually');
$form = id(new PHUIFormLayoutView()) $form = id(new PHUIFormLayoutView())

View file

@ -289,12 +289,14 @@ final class HarbormasterPlanViewController extends HarbormasterPlanController {
->setIcon('fa-ban')); ->setIcon('fa-ban'));
} }
$can_run = ($has_manage && $plan->canRunManually());
$list->addAction( $list->addAction(
id(new PhabricatorActionView()) id(new PhabricatorActionView())
->setName(pht('Run Plan Manually')) ->setName(pht('Run Plan Manually'))
->setHref($this->getApplicationURI("plan/run/{$id}/")) ->setHref($this->getApplicationURI("plan/run/{$id}/"))
->setWorkflow(true) ->setWorkflow(true)
->setDisabled(!$has_manage) ->setDisabled(!$can_run)
->setIcon('fa-play-circle')); ->setIcon('fa-play-circle'));
return $list; return $list;

View file

@ -64,6 +64,11 @@ final class HarbormasterManagementBuildWorkflow
pht('Build plan "%s" does not exist.', $plan_id)); 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(); $console = PhutilConsole::getConsole();
$buildable = HarbormasterBuildable::initializeNewBuildable($viewer) $buildable = HarbormasterBuildable::initializeNewBuildable($viewer)

View file

@ -27,12 +27,11 @@ final class HarbormasterBuildPHIDType extends PhabricatorPHIDType {
foreach ($handles as $phid => $handle) { foreach ($handles as $phid => $handle) {
$build = $objects[$phid]; $build = $objects[$phid];
$handles[$phid]->setName(pht( $build_id = $build->getID();
'Build %d: %s', $name = $build->getName();
$build->getID(),
$build->getName())); $handle->setName(pht('Build %d: %s', $build_id, $name));
$handles[$phid]->setURI( $handle->setURI("/harbormaster/build/{$build_id}/");
'/harbormaster/build/'.$build->getID());
} }
} }

View file

@ -26,7 +26,17 @@ final class HarbormasterBuildTargetPHIDType extends PhabricatorPHIDType {
array $objects) { array $objects) {
foreach ($handles as $phid => $handle) { 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);
} }
} }

View file

@ -291,9 +291,9 @@ final class HarbormasterBuild extends HarbormasterDAO
} }
public static function getAvailableBuildVariables() { public static function getAvailableBuildVariables() {
$objects = id(new PhutilSymbolLoader()) $objects = id(new PhutilClassMapQuery())
->setAncestorClass('HarbormasterBuildableInterface') ->setAncestorClass('HarbormasterBuildableInterface')
->loadObjects(); ->execute();
$variables = array(); $variables = array();
$variables[] = array( $variables[] = array(

View file

@ -85,6 +85,15 @@ final class HarbormasterBuildPlan extends HarbormasterDAO
} }
public function canRunManually() {
if ($this->isAutoplan()) {
return false;
}
return true;
}
public function getName() { public function getName() {
$autoplan = $this->getAutoplan(); $autoplan = $this->getAutoplan();
if ($autoplan) { if ($autoplan) {

View file

@ -5,11 +5,31 @@
*/ */
final class HarbormasterBuildWorker extends HarbormasterWorker { 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() { protected function doWork() {
$viewer = $this->getViewer();
$build = $this->loadBuild();
id(new HarbormasterBuildEngine())
->setViewer($viewer)
->setBuild($build)
->continueBuild();
}
private function loadBuild() {
$data = $this->getTaskData(); $data = $this->getTaskData();
$id = idx($data, 'buildID'); $id = idx($data, 'buildID');
$viewer = $this->getViewer();
$viewer = $this->getViewer();
$build = id(new HarbormasterBuildQuery()) $build = id(new HarbormasterBuildQuery())
->setViewer($viewer) ->setViewer($viewer)
->withIDs(array($id)) ->withIDs(array($id))
@ -19,10 +39,7 @@ final class HarbormasterBuildWorker extends HarbormasterWorker {
pht('Invalid build ID "%s".', $id)); pht('Invalid build ID "%s".', $id));
} }
id(new HarbormasterBuildEngine()) return $build;
->setViewer($viewer)
->setBuild($build)
->continueBuild();
} }
} }

View file

@ -11,6 +11,16 @@ final class HarbormasterTargetWorker extends HarbormasterWorker {
return phutil_units('24 hours in seconds'); 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() { private function loadBuildTarget() {
$data = $this->getTaskData(); $data = $this->getTaskData();
$id = idx($data, 'targetID'); $id = idx($data, 'targetID');

View file

@ -45,6 +45,9 @@ final class HeraldTestConsoleController extends HeraldController {
} else if ($object instanceof PhrictionDocument) { } else if ($object instanceof PhrictionDocument) {
$adapter = id(new PhrictionDocumentHeraldAdapter()) $adapter = id(new PhrictionDocumentHeraldAdapter())
->setDocument($object); ->setDocument($object);
} else if ($object instanceof PonderQuestion) {
$adapter = id(new HeraldPonderQuestionAdapter())
->setQuestion($object);
} else { } else {
throw new Exception(pht('Can not build adapter for object!')); throw new Exception(pht('Can not build adapter for object!'));
} }

View file

@ -219,7 +219,7 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController {
$revisions = $revision_query->execute(); $revisions = $revision_query->execute();
list($blocking, $active, ) = DifferentialRevisionQuery::splitResponsible( list($blocking, $active,) = DifferentialRevisionQuery::splitResponsible(
$revisions, $revisions,
array($user_phid)); array($user_phid));

View file

@ -20,9 +20,9 @@ final class PhabricatorLipsumGenerateWorkflow
public function execute(PhutilArgumentParser $args) { public function execute(PhutilArgumentParser $args) {
$console = PhutilConsole::getConsole(); $console = PhutilConsole::getConsole();
$supported_types = id(new PhutilSymbolLoader()) $supported_types = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorTestDataGenerator') ->setAncestorClass('PhabricatorTestDataGenerator')
->loadObjects(); ->execute();
$console->writeOut( $console->writeOut(
"%s:\n\t%s\n", "%s:\n\t%s\n",

View file

@ -6,17 +6,13 @@ final class PhabricatorApplicationUninstallController
private $application; private $application;
private $action; private $action;
public function willProcessRequest(array $data) { public function handleRequest(AphrontRequest $request) {
$this->application = $data['application']; $viewer = $request->getViewer();
$this->action = $data['action']; $this->action = $request->getURIData('action');
} $this->application = $request->getURIData('application');
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$selected = id(new PhabricatorApplicationQuery()) $selected = id(new PhabricatorApplicationQuery())
->setViewer($user) ->setViewer($viewer)
->withClasses(array($this->application)) ->withClasses(array($this->application))
->requireCapabilities( ->requireCapabilities(
array( array(
@ -35,7 +31,7 @@ final class PhabricatorApplicationUninstallController
'phabricator.show-prototypes'); 'phabricator.show-prototypes');
$dialog = id(new AphrontDialogView()) $dialog = id(new AphrontDialogView())
->setUser($user) ->setUser($viewer)
->addCancelButton($view_uri); ->addCancelButton($view_uri);
if ($selected->isPrototype() && !$prototypes_enabled) { if ($selected->isPrototype() && !$prototypes_enabled) {
@ -118,7 +114,7 @@ final class PhabricatorApplicationUninstallController
} }
PhabricatorConfigEditor::storeNewValue( PhabricatorConfigEditor::storeNewValue(
$this->getRequest()->getUser(), $this->getViewer(),
$config_entry, $config_entry,
$list, $list,
PhabricatorContentSource::newFromRequest($this->getRequest())); PhabricatorContentSource::newFromRequest($this->getRequest()));

View file

@ -3,19 +3,13 @@
final class PhabricatorApplicationsListController final class PhabricatorApplicationsListController
extends PhabricatorApplicationsController { extends PhabricatorApplicationsController {
private $queryKey;
public function shouldAllowPublic() { public function shouldAllowPublic() {
return true; return true;
} }
public function willProcessRequest(array $data) { public function handleRequest(AphrontRequest $request) {
$this->queryKey = idx($data, 'queryKey');
}
public function processRequest() {
$controller = id(new PhabricatorApplicationSearchController()) $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey) ->setQueryKey($request->getURIData('queryKey'))
->setSearchEngine(new PhabricatorAppSearchEngine()) ->setSearchEngine(new PhabricatorAppSearchEngine())
->setNavigation($this->buildSideNavView()); ->setNavigation($this->buildSideNavView());

View file

@ -18,7 +18,7 @@ final class PhabricatorMetaMTAWorker
pht('Unable to load message!')); pht('Unable to load message!'));
} }
if ($message->getStatus() != PhabricatorMetaMTAMail::STATUS_QUEUE) { if ($message->getStatus() != PhabricatorMailOutboundStatus::STATUS_QUEUE) {
return; return;
} }

View file

@ -3,7 +3,7 @@
final class PhabricatorMetaMTAApplication extends PhabricatorApplication { final class PhabricatorMetaMTAApplication extends PhabricatorApplication {
public function getName() { public function getName() {
return pht('MetaMTA'); return pht('Mail');
} }
public function getBaseURI() { public function getBaseURI() {
@ -15,11 +15,11 @@ final class PhabricatorMetaMTAApplication extends PhabricatorApplication {
} }
public function getShortDescription() { public function getShortDescription() {
return pht('Delivers Mail'); return pht('Send and Receive Mail');
} }
public function getFlavorText() { 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() { public function getApplicationGroup() {
@ -30,12 +30,8 @@ final class PhabricatorMetaMTAApplication extends PhabricatorApplication {
return false; return false;
} }
public function isLaunchable() {
return false;
}
public function getTypeaheadURI() { public function getTypeaheadURI() {
return null; return '/mail/';
} }
public function getRoutes() { public function getRoutes() {

View file

@ -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