]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use paste.query for arc paste
authorNick Harper <nharper@fb.com>
Wed, 29 Aug 2012 18:04:19 +0000 (11:04 -0700)
committerNick Harper <nharper@fb.com>
Wed, 29 Aug 2012 18:04:19 +0000 (11:04 -0700)
Summary: paste.info is deprecated; switch to using paste.query

Test Plan:
  arc paste P123
  arc paste P123 --json

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3402

src/workflow/ArcanistPasteWorkflow.php

index 0a77a4d0cb95bf2b06a51600bfbd34c4d9a4a1cc..b030a7ada52306853c8af5369119dc4a7c2cfd78 100644 (file)
@@ -119,10 +119,11 @@ EOTEXT
     $conduit = $this->getConduit();
 
     $info = $conduit->callMethodSynchronous(
-      'paste.info',
+      'paste.query',
       array(
-        'paste_id' => $this->id,
+        'ids' => array($this->id),
       ));
+    $info = head($info);
 
     if ($this->getJSON()) {
       echo json_encode($info)."\n";