diff --git a/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php --- a/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php +++ b/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php @@ -38,7 +38,7 @@ 'authors' => 'optional list', 'ccs' => 'optional list', 'reviewers' => 'optional list', - 'paths' => 'optional list>', + 'paths' => 'unsupported', 'commitHashes' => 'optional list>', 'status' => 'optional '.$status_const, 'order' => 'optional '.$order_const, @@ -92,48 +92,11 @@ } if ($path_pairs) { - $paths = array(); - foreach ($path_pairs as $pair) { - list($callsign, $path) = $pair; - $paths[] = $path; - } - - $path_map = id(new DiffusionPathIDQuery($paths))->loadPathIDs(); - if (count($path_map) != count($paths)) { - $unknown_paths = array(); - foreach ($paths as $p) { - if (!idx($path_map, $p)) { - $unknown_paths[] = $p; - } - } - throw id(new ConduitException('ERR-INVALID-PARAMETER')) - ->setErrorDescription( - pht( - 'Unknown paths: %s', - implode(', ', $unknown_paths))); - } - - $repos = array(); - foreach ($path_pairs as $pair) { - list($callsign, $path) = $pair; - if (!idx($repos, $callsign)) { - $repos[$callsign] = id(new PhabricatorRepositoryQuery()) - ->setViewer($request->getUser()) - ->withCallsigns(array($callsign)) - ->executeOne(); - - if (!$repos[$callsign]) { - throw id(new ConduitException('ERR-INVALID-PARAMETER')) - ->setErrorDescription( - pht( - 'Unknown repo callsign: %s', - $callsign)); - } - } - $repo = $repos[$callsign]; - - $query->withPath($repo->getID(), idx($path_map, $path)); - } + throw new Exception( + pht( + 'Parameter "paths" to Conduit API method "differential.query" is '. + 'no longer supported. Use the "paths" constraint to '. + '"differential.revision.search" instead. See T13639.')); } if ($commit_hashes) {