Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18586375
D7946.diff
No One
Temporary
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
D7946.diff
View Options
Index: src/__phutil_library_map__.php
===================================================================
--- src/__phutil_library_map__.php
+++ src/__phutil_library_map__.php
@@ -2359,6 +2359,7 @@
'ReleephDAO' => 'applications/releeph/storage/ReleephDAO.php',
'ReleephDefaultFieldSelector' => 'applications/releeph/field/selector/ReleephDefaultFieldSelector.php',
'ReleephDefaultUserView' => 'applications/releeph/view/user/ReleephDefaultUserView.php',
+ 'ReleephDependsOnFieldSpecification' => 'applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php',
'ReleephDiffChurnFieldSpecification' => 'applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php',
'ReleephDiffMessageFieldSpecification' => 'applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php',
'ReleephDiffSizeFieldSpecification' => 'applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php',
@@ -5109,6 +5110,7 @@
'ReleephDAO' => 'PhabricatorLiskDAO',
'ReleephDefaultFieldSelector' => 'ReleephFieldSelector',
'ReleephDefaultUserView' => 'ReleephUserView',
+ 'ReleephDependsOnFieldSpecification' => 'ReleephFieldSpecification',
'ReleephDiffChurnFieldSpecification' => 'ReleephFieldSpecification',
'ReleephDiffMessageFieldSpecification' => 'ReleephFieldSpecification',
'ReleephDiffSizeFieldSpecification' => 'ReleephFieldSpecification',
Index: src/applications/releeph/field/selector/ReleephDefaultFieldSelector.php
===================================================================
--- src/applications/releeph/field/selector/ReleephDefaultFieldSelector.php
+++ src/applications/releeph/field/selector/ReleephDefaultFieldSelector.php
@@ -42,6 +42,7 @@
new ReleephBranchCommitFieldSpecification(),
new ReleephDiffSizeFieldSpecification(),
new ReleephDiffChurnFieldSpecification(),
+ new ReleephDependsOnFieldSpecification(),
new ReleephFacebookTagFieldSpecification(),
new ReleephFacebookTasksFieldSpecification(),
);
@@ -76,6 +77,7 @@
'ReleephOriginalCommitFieldSpecification',
'ReleephDiffSizeFieldSpecification',
'ReleephDiffChurnFieldSpecification',
+ 'ReleephDependsOnFieldSpecification',
'ReleephFacebookTasksFieldSpecification',
)),
'right' => self::selectFields($fields, array(
Index: src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php
===================================================================
--- /dev/null
+++ src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php
@@ -0,0 +1,46 @@
+<?php
+
+final class ReleephDependsOnFieldSpecification
+ extends ReleephFieldSpecification {
+ public function getFieldKey() {
+ return 'dependsOn';
+ }
+
+ public function getName() {
+ return pht('Depends On');
+ }
+
+ public function renderValueForHeaderView() {
+ $revision_phids = $this->getDependentRevisionPHIDs();
+ if (!$revision_phids) {
+ return null;
+ }
+
+ $links = array();
+ $handles = id(new PhabricatorHandleQuery())
+ ->setViewer($this->getUser())
+ ->withPHIDs($revision_phids)
+ ->execute();
+ foreach ($revision_phids as $revision_phid) {
+ $links[] = id(clone $handles[$revision_phid])
+ // Hack to remove the strike-through rendering of diff links
+ ->setStatus(null)
+ ->renderLink();
+ }
+
+ return phutil_implode_html(phutil_tag('br'), $links);
+ }
+
+ private function getDependentRevisionPHIDs() {
+ $revision = $this
+ ->getReleephRequest()
+ ->loadDifferentialRevision();
+ if (!$revision) {
+ return null;
+ }
+
+ return PhabricatorEdgeQuery::loadDestinationPHIDs(
+ $revision->getPHID(),
+ PhabricatorEdgeConfig::TYPE_DREV_DEPENDS_ON_DREV);
+ }
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sep 12 2025, 6:23 PM (6 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
9030879
Default Alt Text
D7946.diff (3 KB)
Attached To
Mode
D7946: Add dependencies to releeph
Attached
Detach File
Event Timeline
Log In to Comment