Page MenuHomePhabricator

D21717.id51741.diff
No OneTemporary

D21717.id51741.diff

diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseController.php
@@ -298,22 +298,8 @@
$empty_result->setDiffusionBrowseResultSet($results);
$empty_result->setView($request->getStr('view'));
} else {
- $phids = array();
- foreach ($results->getPaths() as $result) {
- $data = $result->getLastCommitData();
- if ($data) {
- if ($data->getCommitDetail('authorPHID')) {
- $phids[$data->getCommitDetail('authorPHID')] = true;
- }
- }
- }
-
- $phids = array_keys($phids);
- $handles = $this->loadViewerHandles($phids);
-
$browse_table = id(new DiffusionBrowseTableView())
->setDiffusionRequest($drequest)
- ->setHandles($handles)
->setPaths($results->getPaths())
->setUser($request->getUser());
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php
@@ -2,7 +2,6 @@
final class DiffusionRepositoryController extends DiffusionController {
- private $historyFuture;
private $browseFuture;
private $branchButton = null;
private $branchFuture;
@@ -190,17 +189,6 @@
$commit = $drequest->getCommit();
$path = $drequest->getPath();
- $futures = array();
- $this->historyFuture = $this->callConduitMethod(
- 'diffusion.historyquery',
- array(
- 'commit' => $commit,
- 'path' => $path,
- 'offset' => 0,
- 'limit' => 15,
- ));
- $futures[] = $this->historyFuture;
-
$browse_pager = id(new PHUIPagerView())
->readFromRequest($request);
@@ -211,7 +199,6 @@
'path' => $path,
'limit' => $browse_pager->getPageSize() + 1,
));
- $futures[] = $this->browseFuture;
if ($this->needBranchFuture()) {
$branch_limit = $this->getBranchLimit();
@@ -221,41 +208,10 @@
'closed' => false,
'limit' => $branch_limit + 1,
));
- $futures[] = $this->branchFuture;
}
- $futures = array_filter($futures);
- $futures = new FutureIterator($futures);
- foreach ($futures as $future) {
- // Just resolve all the futures before continuing.
- }
-
- $phids = array();
$content = array();
- try {
- $history_results = $this->historyFuture->resolve();
- $history = DiffusionPathChange::newFromConduit(
- $history_results['pathChanges']);
-
- foreach ($history as $item) {
- $data = $item->getCommitData();
- if ($data) {
- if ($data->getCommitDetail('authorPHID')) {
- $phids[$data->getCommitDetail('authorPHID')] = true;
- }
- if ($data->getCommitDetail('committerPHID')) {
- $phids[$data->getCommitDetail('committerPHID')] = true;
- }
- }
- }
- $history_exception = null;
- } catch (Exception $ex) {
- $history_results = null;
- $history = null;
- $history_exception = $ex;
- }
-
try {
$browse_results = $this->browseFuture->resolve();
$browse_results = DiffusionBrowseResultSet::newFromConduit(
@@ -264,18 +220,6 @@
$browse_paths = $browse_results->getPaths();
$browse_paths = $browse_pager->sliceResults($browse_paths);
- foreach ($browse_paths as $item) {
- $data = $item->getLastCommitData();
- if ($data) {
- if ($data->getCommitDetail('authorPHID')) {
- $phids[$data->getCommitDetail('authorPHID')] = true;
- }
- if ($data->getCommitDetail('committerPHID')) {
- $phids[$data->getCommitDetail('committerPHID')] = true;
- }
- }
- }
-
$browse_exception = null;
} catch (Exception $ex) {
$browse_results = null;
@@ -283,9 +227,6 @@
$browse_exception = $ex;
}
- $phids = array_keys($phids);
- $handles = $this->loadViewerHandles($phids);
-
if ($browse_results) {
$readme = $this->renderDirectoryReadme($browse_results);
} else {
@@ -296,7 +237,6 @@
$browse_results,
$browse_paths,
$browse_exception,
- $handles,
$browse_pager);
if ($readme) {
@@ -524,7 +464,6 @@
$browse_results,
$browse_paths,
$browse_exception,
- array $handles,
PHUIPagerView $pager) {
require_celerity_resource('diffusion-icons-css');
@@ -547,8 +486,7 @@
$browse_table = id(new DiffusionBrowseTableView())
->setUser($viewer)
- ->setDiffusionRequest($drequest)
- ->setHandles($handles);
+ ->setDiffusionRequest($drequest);
if ($browse_paths) {
$browse_table->setPaths($browse_paths);
} else {
diff --git a/src/applications/diffusion/view/DiffusionBrowseTableView.php b/src/applications/diffusion/view/DiffusionBrowseTableView.php
--- a/src/applications/diffusion/view/DiffusionBrowseTableView.php
+++ b/src/applications/diffusion/view/DiffusionBrowseTableView.php
@@ -3,7 +3,6 @@
final class DiffusionBrowseTableView extends DiffusionView {
private $paths;
- private $handles = array();
public function setPaths(array $paths) {
assert_instances_of($paths, 'DiffusionRepositoryPath');
@@ -11,12 +10,6 @@
return $this;
}
- public function setHandles(array $handles) {
- assert_instances_of($handles, 'PhabricatorObjectHandle');
- $this->handles = $handles;
- return $this;
- }
-
public function render() {
$request = $this->getDiffusionRequest();
$repository = $request->getRepository();
@@ -29,7 +22,6 @@
$need_pull = array();
$rows = array();
- $show_edit = false;
foreach ($this->paths as $path) {
$full_path = $base_path.$path->getPath();

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 11, 10:14 AM (4 d, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7739700
Default Alt Text
D21717.id51741.diff (5 KB)

Event Timeline