mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Arcanist / Conduit - stop using deprecated differential.getdiff API
Summary: Fixes T7112. Nothing too difficult here. Test Plan: meta - submitting this with the new arcanist code used conduit API to verify the difference between getdiff (just the latest diff) and querydiffs (all diffs that match, with the latest diff first in the set) Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7112 Differential Revision: https://secure.phabricator.com/D11665
This commit is contained in:
parent
a08383aa1b
commit
d98c104991
3 changed files with 10 additions and 8 deletions
|
@ -2173,10 +2173,11 @@ EOTEXT
|
|||
|
||||
private function loadActiveLocalCommitInfo() {
|
||||
$current_diff = $this->getConduit()->callMethodSynchronous(
|
||||
'differential.getdiff',
|
||||
'differential.querydiffs',
|
||||
array(
|
||||
'revision_id' => $this->revisionID,
|
||||
'revisionIDs' => array($this->revisionID),
|
||||
));
|
||||
$current_diff = head($current_diff);
|
||||
|
||||
$properties = idx($current_diff, 'properties', array());
|
||||
return idx($properties, 'local:commits', array());
|
||||
|
|
|
@ -124,10 +124,11 @@ EOTEXT
|
|||
if (preg_match('/^D(\d+)$/', $name, $match)) {
|
||||
try {
|
||||
$diff = $this->getConduit()->callMethodSynchronous(
|
||||
'differential.getdiff',
|
||||
'differential.querydiffs',
|
||||
array(
|
||||
'revision_id' => $match[1],
|
||||
'revisionIDs' => array($match[1]),
|
||||
));
|
||||
$diff = head($diff);
|
||||
|
||||
if ($diff['branch'] != '') {
|
||||
$name = $diff['branch'];
|
||||
|
|
|
@ -1064,7 +1064,7 @@ abstract class ArcanistWorkflow extends Phobject {
|
|||
return $this->loadBundleFromConduit(
|
||||
$conduit,
|
||||
array(
|
||||
'diff_id' => $diff_id,
|
||||
'ids' => array($diff_id),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -1075,7 +1075,7 @@ abstract class ArcanistWorkflow extends Phobject {
|
|||
return $this->loadBundleFromConduit(
|
||||
$conduit,
|
||||
array(
|
||||
'revision_id' => $revision_id,
|
||||
'revisionIDs' => array($revision_id),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -1083,8 +1083,8 @@ abstract class ArcanistWorkflow extends Phobject {
|
|||
ConduitClient $conduit,
|
||||
$params) {
|
||||
|
||||
$future = $conduit->callMethod('differential.getdiff', $params);
|
||||
$diff = $future->resolve();
|
||||
$future = $conduit->callMethod('differential.querydiffs', $params);
|
||||
$diff = head($future->resolve());
|
||||
|
||||
$changes = array();
|
||||
foreach ($diff['changes'] as $changedict) {
|
||||
|
|
Loading…
Reference in a new issue