mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-29 02:02:40 +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() {
|
private function loadActiveLocalCommitInfo() {
|
||||||
$current_diff = $this->getConduit()->callMethodSynchronous(
|
$current_diff = $this->getConduit()->callMethodSynchronous(
|
||||||
'differential.getdiff',
|
'differential.querydiffs',
|
||||||
array(
|
array(
|
||||||
'revision_id' => $this->revisionID,
|
'revisionIDs' => array($this->revisionID),
|
||||||
));
|
));
|
||||||
|
$current_diff = head($current_diff);
|
||||||
|
|
||||||
$properties = idx($current_diff, 'properties', array());
|
$properties = idx($current_diff, 'properties', array());
|
||||||
return idx($properties, 'local:commits', array());
|
return idx($properties, 'local:commits', array());
|
||||||
|
|
|
@ -124,10 +124,11 @@ EOTEXT
|
||||||
if (preg_match('/^D(\d+)$/', $name, $match)) {
|
if (preg_match('/^D(\d+)$/', $name, $match)) {
|
||||||
try {
|
try {
|
||||||
$diff = $this->getConduit()->callMethodSynchronous(
|
$diff = $this->getConduit()->callMethodSynchronous(
|
||||||
'differential.getdiff',
|
'differential.querydiffs',
|
||||||
array(
|
array(
|
||||||
'revision_id' => $match[1],
|
'revisionIDs' => array($match[1]),
|
||||||
));
|
));
|
||||||
|
$diff = head($diff);
|
||||||
|
|
||||||
if ($diff['branch'] != '') {
|
if ($diff['branch'] != '') {
|
||||||
$name = $diff['branch'];
|
$name = $diff['branch'];
|
||||||
|
|
|
@ -1064,7 +1064,7 @@ abstract class ArcanistWorkflow extends Phobject {
|
||||||
return $this->loadBundleFromConduit(
|
return $this->loadBundleFromConduit(
|
||||||
$conduit,
|
$conduit,
|
||||||
array(
|
array(
|
||||||
'diff_id' => $diff_id,
|
'ids' => array($diff_id),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1075,7 +1075,7 @@ abstract class ArcanistWorkflow extends Phobject {
|
||||||
return $this->loadBundleFromConduit(
|
return $this->loadBundleFromConduit(
|
||||||
$conduit,
|
$conduit,
|
||||||
array(
|
array(
|
||||||
'revision_id' => $revision_id,
|
'revisionIDs' => array($revision_id),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1083,8 +1083,8 @@ abstract class ArcanistWorkflow extends Phobject {
|
||||||
ConduitClient $conduit,
|
ConduitClient $conduit,
|
||||||
$params) {
|
$params) {
|
||||||
|
|
||||||
$future = $conduit->callMethod('differential.getdiff', $params);
|
$future = $conduit->callMethod('differential.querydiffs', $params);
|
||||||
$diff = $future->resolve();
|
$diff = head($future->resolve());
|
||||||
|
|
||||||
$changes = array();
|
$changes = array();
|
||||||
foreach ($diff['changes'] as $changedict) {
|
foreach ($diff['changes'] as $changedict) {
|
||||||
|
|
Loading…
Reference in a new issue