Render pretty graphical traces for commit branches, etc

Summary: I AM A WIZARD

Test Plan: BEHOLD

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T961

Differential Revision: https://secure.phabricator.com/D2007
This commit is contained in:
epriestley
2012-03-23 17:11:15 -07:00
parent bee69f9ce2
commit c2f50e258a
11 changed files with 456 additions and 37 deletions

View File

@@ -35,6 +35,11 @@ final class DiffusionHistoryController extends DiffusionController {
$history_query->needChildChanges(true);
}
$show_graph = !strlen($drequest->getPath());
if ($show_graph) {
$history_query->needParents(true);
}
$history = $history_query->loadHistory();
$pager = new AphrontPagerView();
@@ -81,6 +86,11 @@ final class DiffusionHistoryController extends DiffusionController {
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
$history_table->setHandles($handles);
if ($show_graph) {
$history_table->setParents($history_query->getParents());
$history_table->setIsHead($offset == 0);
}
$history_panel = new AphrontPanelView();
$history_panel->setHeader('History');
$history_panel->addButton($button);

View File

@@ -31,6 +31,7 @@ final class DiffusionRepositoryController extends DiffusionController {
$history_query = DiffusionHistoryQuery::newFromDiffusionRequest(
$drequest);
$history_query->setLimit(15);
$history_query->needParents(true);
$history = $history_query->loadHistory();
$browse_query = DiffusionBrowseQuery::newFromDiffusionRequest($drequest);
@@ -63,6 +64,8 @@ final class DiffusionRepositoryController extends DiffusionController {
$history_table->setDiffusionRequest($drequest);
$history_table->setHandles($handles);
$history_table->setHistory($history);
$history_table->setParents($history_query->getParents());
$history_table->setIsHead(true);
$callsign = $drequest->getRepository()->getCallsign();
$all = phutil_render_tag(