Diffusion - move DiffQuery to Conduit
Summary: title does not say it all; also added conduit wrappers for rawdiffquery and lastmodifiedquery. These get the wrapper treatment since they are used in daemons. Ref T2784. Test Plan: for each of the 3 VCS, did the following: 1) loaded up CALLSIGN and verified 'Modified' column data showed up correctly in Browse Repository box. 2) loaded up the "change" view for a specific file and verified content showed up correctly. 3) loaded up a specific commit and noted the changes ajax loaded A-OK Reviewers: epriestley Reviewed By: epriestley CC: chad, aran, Korvin Maniphest Tasks: T2784 Differential Revision: https://secure.phabricator.com/D5896
This commit is contained in:
@@ -42,19 +42,27 @@ final class DiffusionDiffController extends DiffusionController {
|
||||
return id(new AphrontRedirectResponse())->setURI($uri);
|
||||
}
|
||||
|
||||
|
||||
$diff_query = DiffusionDiffQuery::newFromDiffusionRequest($drequest);
|
||||
$changeset = $diff_query->loadChangeset();
|
||||
$data = $this->callConduitWithDiffusionRequest(
|
||||
'diffusion.diffquery',
|
||||
array(
|
||||
'commit' => $drequest->getCommit(),
|
||||
'path' => $drequest->getPath()));
|
||||
$drequest->setCommit($data['effectiveCommit']);
|
||||
$raw_changes = ArcanistDiffChange::newFromConduit($data['changes']);
|
||||
$diff = DifferentialDiff::newFromRawChanges($raw_changes);
|
||||
$changesets = $diff->getChangesets();
|
||||
$changeset = reset($changesets);
|
||||
|
||||
if (!$changeset) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
|
||||
$parser = new DifferentialChangesetParser();
|
||||
$parser->setUser($user);
|
||||
$parser->setChangeset($changeset);
|
||||
$parser->setRenderingReference($diff_query->getRenderingReference());
|
||||
$parser->setRenderingReference($drequest->generateURI(
|
||||
array(
|
||||
'action' => 'rendering-ref')));
|
||||
|
||||
$pquery = new DiffusionPathIDQuery(array($changeset->getFilename()));
|
||||
$ids = $pquery->loadPathIDs();
|
||||
|
||||
Reference in New Issue
Block a user