mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 23:02:41 +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 = 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(
|
|
||||||
'differential.getrevision',
|
|
||||||
array(
|
array(
|
||||||
'revision_id' => $revision_id,
|
'ids' => array($revision_id),
|
||||||
));
|
));
|
||||||
} catch (Exception $ex) {
|
$revision = head($revisions);
|
||||||
if (!$is_finalize) {
|
|
||||||
|
if (!$revision && !$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;
|
||||||
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
|
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue