1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Convert a low-level VCS query in Diff extraction to a Conduit call

Summary: Ref T9319. Ref T2783. This won't currently work in a future environment where daemons and repositories are not on the same host. Send it over Conduit instead.

Test Plan: Used `bin/differential attach-commit rX Dy` to force attachment, saw valid content pull over Conduit.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2783, T9319

Differential Revision: https://secure.phabricator.com/D14969
This commit is contained in:
epriestley 2016-01-08 05:51:58 -08:00
parent 413ca12fda
commit da3963b009

View file

@ -142,17 +142,21 @@ final class DifferentialDiffExtractionEngine extends Phobject {
return true;
}
$drequest = DiffusionRequest::newFromDictionary(array(
$drequest = DiffusionRequest::newFromDictionary(
array(
'user' => $viewer,
'repository' => $repository,
));
$response = DiffusionQuery::callConduitWithDiffusionRequest(
$viewer,
$drequest,
'diffusion.filecontentquery',
array(
'commit' => $identifier,
'path' => $path,
));
$corpus = DiffusionFileContentQuery::newFromDiffusionRequest($drequest)
->setViewer(PhabricatorUser::getOmnipotentUser())
->loadFileContent()
->getCorpus();
$corpus = $response['corpus'];
if ($files[$file_phid]->loadFileData() != $corpus) {
return true;