Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionHistoryController.php
| Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | if ($identifiers) { | ||||
| ->needIdentities(true) | ->needIdentities(true) | ||||
| ->execute(); | ->execute(); | ||||
| } else { | } else { | ||||
| $commits = array(); | $commits = array(); | ||||
| } | } | ||||
| $history_list = id(new DiffusionCommitGraphView()) | $history_list = id(new DiffusionCommitGraphView()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->setParents($history_results['parents']) | |||||
| ->setIsHead(!$pager->getOffset()) | |||||
| ->setIsTail(!$pager->getHasMorePages()) | |||||
| ->setDiffusionRequest($drequest) | ->setDiffusionRequest($drequest) | ||||
| ->setHistory($history) | ->setHistory($history) | ||||
| ->setCommits($commits); | ->setCommits($commits); | ||||
| // NOTE: If we have a path (like "src/"), many nodes in the graph are | |||||
| // likely to be missing (since the path wasn't touched by those commits). | |||||
| // If we draw the graph, commits will often appear to be unrelated because | |||||
| // intermediate nodes are omitted. Just drop the graph. | |||||
| // The ideal behavior would be to load the entire graph and then connect | |||||
| // ancestors appropriately, but this would currrently be prohibitively | |||||
| // expensive in the general case. | |||||
| $show_graph = !strlen($drequest->getPath()); | |||||
| if ($show_graph) { | |||||
| $history_list | |||||
| ->setParents($history_results['parents']) | |||||
| ->setIsHead(!$pager->getOffset()) | |||||
| ->setIsTail(!$pager->getHasMorePages()); | |||||
| } | |||||
| $header = $this->buildHeader($drequest); | $header = $this->buildHeader($drequest); | ||||
| $crumbs = $this->buildCrumbs( | $crumbs = $this->buildCrumbs( | ||||
| array( | array( | ||||
| 'branch' => true, | 'branch' => true, | ||||
| 'path' => true, | 'path' => true, | ||||
| 'view' => 'history', | 'view' => 'history', | ||||
| )); | )); | ||||
| ▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines | |||||