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