Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15455693
D11667.id28079.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11667.id28079.diff
View Options
diff --git a/src/workflow/ArcanistBackoutWorkflow.php b/src/workflow/ArcanistBackoutWorkflow.php
--- a/src/workflow/ArcanistBackoutWorkflow.php
+++ b/src/workflow/ArcanistBackoutWorkflow.php
@@ -88,15 +88,16 @@
*/
private function getDiffusionCommit($commit_id) {
$result = $this->getConduit()->callMethodSynchronous(
- 'diffusion.getcommits',
+ 'diffusion.querycommits',
array(
- 'commits' => array($commit_id),
+ 'names' => array($commit_id),
));
- $commit = $result[$commit_id];
+ $phid = idx($result['identifierMap'], $commit_id);
// This commit was not found in Diffusion
- if (array_key_exists('error', $commit)) {
+ if (!$phid) {
return null;
}
+ $commit = $result['data'][$phid];
return $commit;
}
@@ -157,7 +158,7 @@
$revision_id = $matches[1];
$commit_id = $this->getCommitIDFromRevisionID($revision_id);
$commit = $this->getDiffusionCommit($commit_id);
- $commit_hash = $commit['commitIdentifier'];
+ $commit_hash = $commit['identifier'];
// Convert commit hash from SVN to Git/HG (for FB case)
if ($is_git_svn || $is_hg_svn) {
$commit_hash = $repository_api->
diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php
--- a/src/workflow/ArcanistWorkflow.php
+++ b/src/workflow/ArcanistWorkflow.php
@@ -1008,10 +1008,12 @@
$repository = $this->loadProjectRepository();
if ($repository) {
$callsign = $repository['callsign'];
- $known_commits = $this->getConduit()->callMethodSynchronous(
- 'diffusion.getcommits',
- array('commits' => array('r'.$callsign.$commit['commit'])));
- if (ifilter($known_commits, 'error', $negate = true)) {
+ $commit_name = 'r'.$callsign.$commit['commit'];
+ $result = $this->getConduit()->callMethodSynchronous(
+ 'diffusion.querycommits',
+ array('names' => array($commit_name)));
+ $known_commit = idx($result['identifierMap'], $commit_name);
+ if (!$known_commit) {
return false;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 31, 4:21 AM (1 w, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7613737
Default Alt Text
D11667.id28079.diff (2 KB)
Attached To
Mode
D11667: Arcanist / Conduit - stop using deprecated diffusion.getcommits
Attached
Detach File
Event Timeline
Log In to Comment