Differential D13224 Diff 32492 src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | if ($client) { | ||||
return $this->getResult($request); | return $this->getResult($request); | ||||
} | } | ||||
} | } | ||||
protected function getResult(ConduitAPIRequest $request) { | protected function getResult(ConduitAPIRequest $request) { | ||||
$repository = $this->getRepository($request); | $repository = $this->getRepository($request); | ||||
$result = null; | $result = null; | ||||
switch ($repository->getVersionControlSystem()) { | switch ($repository->getVersionControlSystem()) { | ||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: | case DiffusionRepositoryType::REPOSITORY_TYPE_GIT: | ||||
$result = $this->getGitResult($request); | $result = $this->getGitResult($request); | ||||
break; | break; | ||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: | case DiffusionRepositoryType::REPOSITORY_TYPE_MERCURIAL: | ||||
$result = $this->getMercurialResult($request); | $result = $this->getMercurialResult($request); | ||||
break; | break; | ||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: | case DiffusionRepositoryType::REPOSITORY_TYPE_SVN: | ||||
$result = $this->getSVNResult($request); | $result = $this->getSVNResult($request); | ||||
break; | break; | ||||
default: | default: | ||||
throw new ConduitException('ERR-UNKNOWN-VCS-TYPE'); | throw new ConduitException('ERR-UNKNOWN-VCS-TYPE'); | ||||
break; | break; | ||||
} | } | ||||
return $result; | return $result; | ||||
} | } | ||||
} | } |