Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F77126
D7452.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D7452.diff
View Options
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
@@ -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));
diff --git a/src/applications/diffusion/view/DiffusionHistoryTableView.php b/src/applications/diffusion/view/DiffusionHistoryTableView.php
--- a/src/applications/diffusion/view/DiffusionHistoryTableView.php
+++ b/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(),
diff --git a/src/applications/diffusion/view/DiffusionTagListView.php b/src/applications/diffusion/view/DiffusionTagListView.php
--- a/src/applications/diffusion/view/DiffusionTagListView.php
+++ b/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
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/op/m4/5vyccm7w5rv4p25l
Default Alt Text
D7452.diff (3 KB)
Attached To
Mode
D7452: Clean up Diffusion tag list query a bit
Attached
Detach File
Event Timeline
Log In to Comment