Diffusion - move history query to conduit

Summary: Ref T2784

Test Plan: for each flavor of VCS, I loaded up the repository home page. verified I saw some parent action where appropos. next, clicked through to 'view history' and verified it loaded up A-OK.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2784

Differential Revision: https://secure.phabricator.com/D5960
This commit is contained in:
Bob Trahan
2013-05-20 12:45:34 -07:00
parent 80ce5968db
commit df50e380ca
17 changed files with 367 additions and 347 deletions

View File

@@ -12,11 +12,15 @@ final class DiffusionRepositoryController extends DiffusionController {
$content[] = $this->buildPropertiesTable($drequest->getRepository());
$history_query = DiffusionHistoryQuery::newFromDiffusionRequest(
$drequest);
$history_query->setLimit(15);
$history_query->needParents(true);
$history = $history_query->loadHistory();
$history_results = $this->callConduitWithDiffusionRequest(
'diffusion.historyquery',
array(
'commit' => $drequest->getCommit(),
'path' => $drequest->getPath(),
'offset' => 0,
'limit' => 15));
$history = DiffusionPathChange::newFromConduit(
$history_results['pathChanges']);
$browse_results = DiffusionBrowseResultSet::newFromConduit(
$this->callConduitWithDiffusionRequest(
@@ -63,7 +67,7 @@ final class DiffusionRepositoryController extends DiffusionController {
$history_table->setHandles($handles);
$history_table->setHistory($history);
$history_table->loadRevisions();
$history_table->setParents($history_query->getParents());
$history_table->setParents($history_results['parents']);
$history_table->setIsHead(true);
$callsign = $drequest->getRepository()->getCallsign();