Page MenuHomePhabricator

D21717.diff
No OneTemporary

D21717.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;
@@ -191,15 +190,6 @@
$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);
@@ -230,32 +220,8 @@
// 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 +230,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 +237,6 @@
$browse_exception = $ex;
}
- $phids = array_keys($phids);
- $handles = $this->loadViewerHandles($phids);
-
if ($browse_results) {
$readme = $this->renderDirectoryReadme($browse_results);
} else {
@@ -296,7 +247,6 @@
$browse_results,
$browse_paths,
$browse_exception,
- $handles,
$browse_pager);
if ($readme) {
@@ -524,7 +474,6 @@
$browse_results,
$browse_paths,
$browse_exception,
- array $handles,
PHUIPagerView $pager) {
require_celerity_resource('diffusion-icons-css');
@@ -547,8 +496,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
Sun, May 12, 9:24 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6273771
Default Alt Text
D21717.diff (5 KB)

Event Timeline