Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18846639
D7946.id17969.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.id17969.diff
View Options
Index: src/__phutil_library_map__.php
===================================================================
--- src/__phutil_library_map__.php
+++ src/__phutil_library_map__.php
@@ -2357,6 +2357,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',
@@ -5105,6 +5106,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,43 @@
+<?php
+
+final class ReleephDependsOnFieldSpecification
+ extends ReleephFieldSpecification {
+ public function getFieldKey() {
+ return 'dependsOn';
+ }
+
+ public function getName() {
+ return 'Depends On';
+ }
+
+ public function renderValueForHeaderView() {
+ $revision_phids = $this->getDependentRevisionPHIDs();
+ if (!$revision_phids) {
+ return null;
+ }
+
+ $links = array();
+ $handles = $this->getReleephRequest()->getHandles();
+ foreach ($revision_phids as $revision_phid) {
+ $links[] = $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
Thu, Oct 30, 8:16 PM (1 d, 11 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
9087821
Default Alt Text
D7946.id17969.diff (3 KB)
Attached To
Mode
D7946: Add dependencies to releeph
Attached
Detach File
Event Timeline
Log In to Comment