Page MenuHomePhabricator

D7452.diff
No OneTemporary

D7452.diff

Index: src/applications/diffusion/controller/DiffusionRepositoryController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionRepositoryController.php
+++ src/applications/diffusion/controller/DiffusionRepositoryController.php
@@ -225,15 +225,15 @@
->withRepositoryIDs(array($drequest->getRepository()->getID()))
->execute();
- $table = new DiffusionBranchTableView();
- $table->setDiffusionRequest($drequest);
- $table->setBranches($branches);
- $table->setCommits($commits);
- $table->setUser($this->getRequest()->getUser());
+ $table = id(new DiffusionBranchTableView())
+ ->setUser($viewer)
+ ->setDiffusionRequest($drequest)
+ ->setBranches($branches)
+ ->setCommits($commits);
- $panel = new AphrontPanelView();
- $panel->setHeader(pht('Branches'));
- $panel->setNoBackground();
+ $panel = id(new AphrontPanelView())
+ ->setHeader(pht('Branches'))
+ ->setNoBackground();
if ($more_branches) {
$panel->setCaption(pht('Showing %d branches.', $limit));
@@ -257,6 +257,8 @@
}
private function buildTagListTable(DiffusionRequest $drequest) {
+ $viewer = $this->getRequest()->getUser();
+
$tag_limit = 15;
$tags = array();
try {
@@ -281,26 +283,26 @@
$more_tags = (count($tags) > $tag_limit);
$tags = array_slice($tags, 0, $tag_limit);
- $commits = id(new PhabricatorAuditCommitQuery())
- ->withIdentifiers(
- $drequest->getRepository()->getID(),
- mpull($tags, 'getCommitIdentifier'))
+ $commits = id(new DiffusionCommitQuery())
+ ->setViewer($viewer)
+ ->withIdentifiers(mpull($tags, 'getCommitIdentifier'))
+ ->withRepositoryIDs(array($drequest->getRepository()->getID()))
->needCommitData(true)
->execute();
- $view = new DiffusionTagListView();
- $view->setDiffusionRequest($drequest);
- $view->setTags($tags);
- $view->setUser($this->getRequest()->getUser());
- $view->setCommits($commits);
+ $view = id(new DiffusionTagListView())
+ ->setUser($viewer)
+ ->setDiffusionRequest($drequest)
+ ->setTags($tags)
+ ->setCommits($commits);
$phids = $view->getRequiredHandlePHIDs();
$handles = $this->loadViewerHandles($phids);
$view->setHandles($handles);
- $panel = new AphrontPanelView();
- $panel->setHeader(pht('Tags'));
- $panel->setNoBackground(true);
+ $panel = id(new AphrontPanelView())
+ ->setHeader(pht('Tags'))
+ ->setNoBackground(true);
if ($more_tags) {
$panel->setCaption(pht('Showing the %d most recent tags.', $tag_limit));
Index: src/applications/diffusion/view/DiffusionHistoryTableView.php
===================================================================
--- src/applications/diffusion/view/DiffusionHistoryTableView.php
+++ src/applications/diffusion/view/DiffusionHistoryTableView.php
@@ -113,7 +113,7 @@
}
$commit = $history->getCommit();
- if ($commit && !$commit->getIsUnparsed() && $data) {
+ if ($commit && $commit->isImported() && $data) {
$change = $this->linkChange(
$history->getChangeType(),
$history->getFileType(),
Index: src/applications/diffusion/view/DiffusionTagListView.php
===================================================================
--- src/applications/diffusion/view/DiffusionTagListView.php
+++ src/applications/diffusion/view/DiffusionTagListView.php
@@ -73,8 +73,8 @@
// unique data which isn't otherwise available.
$description = $tag->getDescription();
} else {
- if ($commit && $commit->getCommitData()) {
- $description = $commit->getCommitData()->getSummary();
+ if ($commit) {
+ $description = $commit->getSummary();
} else {
$description = $tag->getDescription();
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 12:54 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6710716
Default Alt Text
D7452.diff (3 KB)

Event Timeline