Page MenuHomePhabricator

D11591.id27992.diff
No OneTemporary

D11591.id27992.diff

diff --git a/src/applications/releeph/commitfinder/ReleephCommitFinder.php b/src/applications/releeph/commitfinder/ReleephCommitFinder.php
--- a/src/applications/releeph/commitfinder/ReleephCommitFinder.php
+++ b/src/applications/releeph/commitfinder/ReleephCommitFinder.php
@@ -30,13 +30,16 @@
$matches = array();
if (preg_match('/^D([1-9]\d*)$/', $partial_string, $matches)) {
$diff_id = $matches[1];
- // TOOD: (T603) This is all slated for annihilation.
- $diff_rev = id(new DifferentialRevision())->load($diff_id);
+ $diff_rev = id(new DifferentialRevisionQuery())
+ ->setViewer($this->getUser())
+ ->withIDs(array($diff_id))
+ ->needCommitPHIDs(true)
+ ->executeOne();
if (!$diff_rev) {
throw new ReleephCommitFinderException(
"{$partial_string} does not refer to an existing diff.");
}
- $commit_phids = $diff_rev->loadCommitPHIDs();
+ $commit_phids = $diff_rev->getCommitPHIDs();
if (!$commit_phids) {
throw new ReleephCommitFinderException(
@@ -45,9 +48,11 @@
$this->objectPHID = $diff_rev->getPHID();
- $commits = id(new PhabricatorRepositoryCommit())->loadAllWhere(
- 'phid IN (%Ls) ORDER BY epoch ASC',
- $commit_phids);
+ $commits = id(new DiffusionCommitQuery())
+ ->setViewer($this->getUser())
+ ->withPHIDs($commit_phids)
+ ->execute();
+ $commits = msort($commits, 'getEpoch');
return head($commits);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 2, 8:07 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705033
Default Alt Text
D11591.id27992.diff (1 KB)

Event Timeline