Differential D14970 Diff 36173 src/applications/diffusion/query/filecontent/DiffusionMercurialFileContentQuery.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/filecontent/DiffusionMercurialFileContentQuery.php
| <?php | <?php | ||||
| final class DiffusionMercurialFileContentQuery | final class DiffusionMercurialFileContentQuery | ||||
| extends DiffusionFileContentQuery { | extends DiffusionFileContentQuery { | ||||
| public function getFileContentFuture() { | protected function getFileContentFuture() { | ||||
| $drequest = $this->getRequest(); | $drequest = $this->getRequest(); | ||||
| $repository = $drequest->getRepository(); | $repository = $drequest->getRepository(); | ||||
| $path = $drequest->getPath(); | $path = $drequest->getPath(); | ||||
| $commit = $drequest->getCommit(); | $commit = $drequest->getCommit(); | ||||
| return $repository->getLocalCommandFuture( | return $repository->getLocalCommandFuture( | ||||
| 'cat --rev %s -- %s', | 'cat --rev %s -- %s', | ||||
| $commit, | $commit, | ||||
| $path); | $path); | ||||
| } | } | ||||
| protected function executeQueryFromFuture(Future $future) { | protected function resolveFileContentFuture(Future $future) { | ||||
| list($corpus) = $future->resolvex(); | list($corpus) = $future->resolvex(); | ||||
| return $corpus; | |||||
| $file_content = new DiffusionFileContent(); | |||||
| $file_content->setCorpus($corpus); | |||||
| return $file_content; | |||||
| } | } | ||||
| } | } | ||||