@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Clean up Diffusion dedicated tag table view

Summary: Minor cleanup. Make the "imported" check less strict (we don't need owners or herald to show change status). Export the "imported" flag over Conduit.

Test Plan: Viewed tag table. Viewed partially imported repositories.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7455

+27 -20
+1 -1
src/applications/diffusion/controller/DiffusionBranchTableController.php
··· 55 55 56 56 $crumbs = $this->buildCrumbs( 57 57 array( 58 - 'branches' => true, 58 + 'branches' => true, 59 59 )); 60 60 61 61 return $this->buildApplicationPage(
+14 -17
src/applications/diffusion/controller/DiffusionTagListController.php
··· 9 9 public function processRequest() { 10 10 $drequest = $this->getDiffusionRequest(); 11 11 $request = $this->getRequest(); 12 - $user = $request->getUser(); 12 + $viewer = $request->getUser(); 13 13 14 14 $repository = $drequest->getRepository(); 15 15 ··· 42 42 43 43 $content = null; 44 44 if (!$tags) { 45 - $content = new AphrontErrorView(); 46 - $content->setTitle(pht('No Tags')); 47 - if ($is_commit) { 48 - $content->appendChild(pht('This commit has no tags.')); 49 - } else { 50 - $content->appendChild(pht('This repository has no tags.')); 51 - } 52 - $content->setSeverity(AphrontErrorView::SEVERITY_NODATA); 45 + $content = $this->renderStatusMessage( 46 + pht('No Tags'), 47 + $is_commit 48 + ? pht('This commit has no tags.') 49 + : pht('This repository has no tags.')); 53 50 } else { 54 - $commits = id(new PhabricatorAuditCommitQuery()) 55 - ->withIdentifiers( 56 - $drequest->getRepository()->getID(), 57 - mpull($tags, 'getCommitIdentifier')) 51 + $commits = id(new DiffusionCommitQuery()) 52 + ->setViewer($viewer) 53 + ->withRepositoryIDs(array($repository->getID())) 54 + ->withIdentifiers(mpull($tags, 'getCommitIdentifier')) 58 55 ->needCommitData(true) 59 56 ->execute(); 60 57 61 58 $view = id(new DiffusionTagListView()) 62 59 ->setTags($tags) 63 - ->setUser($user) 60 + ->setUser($viewer) 64 61 ->setCommits($commits) 65 62 ->setDiffusionRequest($drequest); 66 63 ··· 78 75 79 76 $crumbs = $this->buildCrumbs( 80 77 array( 81 - 'tags' => true, 82 - 'commit' => $drequest->getRawCommit(), 78 + 'tags' => true, 79 + 'commit' => $drequest->getRawCommit(), 83 80 )); 84 81 85 82 return $this->buildApplicationPage( ··· 89 86 ), 90 87 array( 91 88 'title' => array( 92 - 'Tags', 89 + pht('Tags'), 93 90 $repository->getCallsign().' Repository', 94 91 ), 95 92 ));
+5 -1
src/applications/diffusion/view/DiffusionHistoryTableView.php
··· 112 112 $author = hsprintf('%s/%s', $author, $committer); 113 113 } 114 114 115 + // We can show details once the message and change have been imported. 116 + $partial_import = PhabricatorRepositoryCommit::IMPORTED_MESSAGE | 117 + PhabricatorRepositoryCommit::IMPORTED_CHANGE; 118 + 115 119 $commit = $history->getCommit(); 116 - if ($commit && $commit->isImported() && $data) { 120 + if ($commit && $commit->isPartiallyImported($partial_import) && $data) { 117 121 $change = $this->linkChange( 118 122 $history->getChangeType(), 119 123 $history->getFileType(),
+7 -1
src/applications/repository/storage/PhabricatorRepositoryCommit.php
··· 36 36 return $this->assertAttached($this->repository); 37 37 } 38 38 39 + public function isPartiallyImported($mask) { 40 + return (($mask & $this->getImportStatus()) == $mask); 41 + } 42 + 39 43 public function isImported() { 40 44 return ($this->getImportStatus() == self::IMPORTED_ALL); 41 45 } ··· 218 222 'mailKey' => $this->getMailKey(), 219 223 'authorPHID' => $this->getAuthorPHID(), 220 224 'auditStatus' => $this->getAuditStatus(), 221 - 'summary' => $this->getSummary()); 225 + 'summary' => $this->getSummary(), 226 + 'importStatus' => $this->getImportStatus(), 227 + ); 222 228 } 223 229 224 230 public static function newFromDictionary(array $dict) {