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:
@@ -5,10 +5,24 @@ final class DiffusionLastModifiedController extends DiffusionController {
|
||||
public function processRequest() {
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
$request = $this->getRequest();
|
||||
$commit = null;
|
||||
$commit_data = null;
|
||||
|
||||
$modified_query = DiffusionLastModifiedQuery::newFromDiffusionRequest(
|
||||
$drequest);
|
||||
list($commit, $commit_data) = $modified_query->loadLastModification();
|
||||
$conduit_result = $this->callConduitWithDiffusionRequest(
|
||||
'diffusion.lastmodifiedquery',
|
||||
array(
|
||||
'commit' => $drequest->getCommit(),
|
||||
'path' => $drequest->getPath()
|
||||
));
|
||||
$c_dict = $conduit_result['commit'];
|
||||
if ($c_dict) {
|
||||
$commit = PhabricatorRepositoryCommit::newFromDictionary($c_dict);
|
||||
}
|
||||
$c_d_dict = $conduit_result['commitData'];
|
||||
if ($c_d_dict) {
|
||||
$commit_data =
|
||||
PhabricatorRepositoryCommitData::newFromDictionary($c_d_dict);
|
||||
}
|
||||
|
||||
$phids = array();
|
||||
if ($commit_data) {
|
||||
|
||||
Reference in New Issue
Block a user