mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 08:42: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:
parent
7130004015
commit
910df64d31
2 changed files with 12 additions and 14 deletions
|
@ -79,20 +79,18 @@ EOTEXT
|
|||
$revision_id = reset($revision_list);
|
||||
$revision_id = $this->normalizeRevisionID($revision_id);
|
||||
|
||||
$revision = null;
|
||||
try {
|
||||
$revision = $conduit->callMethodSynchronous(
|
||||
'differential.getrevision',
|
||||
$revisions = $conduit->callMethodSynchronous(
|
||||
'differential.query',
|
||||
array(
|
||||
'revision_id' => $revision_id,
|
||||
'ids' => array($revision_id),
|
||||
));
|
||||
} catch (Exception $ex) {
|
||||
if (!$is_finalize) {
|
||||
$revision = head($revisions);
|
||||
|
||||
if (!$revision && !$is_finalize) {
|
||||
throw new ArcanistUsageException(
|
||||
"Revision D{$revision_id} does not exist."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
|
||||
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
|
||||
|
|
|
@ -253,7 +253,7 @@ EOTEXT
|
|||
$find_params['status'] = ($status ? "status-".$status : "status-open");
|
||||
|
||||
$tasks = $conduit->callMethodSynchronous(
|
||||
'maniphest.find',
|
||||
'maniphest.query',
|
||||
$find_params);
|
||||
|
||||
return $tasks;
|
||||
|
|
Loading…
Reference in a new issue