1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 16:52:40 +01:00

Stop using deprecated Conduit methods in arc

Summary:
  - Replace `maniphest.find` with `maniphest.query`. These calls are nearly identical, it was just a rename for consistency.
  - Replace `differential.find` with `differential.query`.

Test Plan:
  - Ran `arc tasks`.
  - Ran `arc close-revision` on valid, nonexistent, and existent-but-invalid revisions.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6336
This commit is contained in:
epriestley 2013-07-02 05:47:52 -07:00
parent 7130004015
commit 910df64d31
2 changed files with 12 additions and 14 deletions

View file

@ -79,19 +79,17 @@ EOTEXT
$revision_id = reset($revision_list); $revision_id = reset($revision_list);
$revision_id = $this->normalizeRevisionID($revision_id); $revision_id = $this->normalizeRevisionID($revision_id);
$revision = null; $revisions = $conduit->callMethodSynchronous(
try { 'differential.query',
$revision = $conduit->callMethodSynchronous( array(
'differential.getrevision', 'ids' => array($revision_id),
array( ));
'revision_id' => $revision_id, $revision = head($revisions);
));
} catch (Exception $ex) { if (!$revision && !$is_finalize) {
if (!$is_finalize) { throw new ArcanistUsageException(
throw new ArcanistUsageException( "Revision D{$revision_id} does not exist."
"Revision D{$revision_id} does not exist." );
);
}
} }
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED; $status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;

View file

@ -253,7 +253,7 @@ EOTEXT
$find_params['status'] = ($status ? "status-".$status : "status-open"); $find_params['status'] = ($status ? "status-".$status : "status-open");
$tasks = $conduit->callMethodSynchronous( $tasks = $conduit->callMethodSynchronous(
'maniphest.find', 'maniphest.query',
$find_params); $find_params);
return $tasks; return $tasks;