diff --git a/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php --- a/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php +++ b/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php @@ -142,9 +142,11 @@ private function loadCustomFieldStorage( PhabricatorUser $viewer, DifferentialRevision $revision) { + $custom_field_list = PhabricatorCustomField::getObjectFields( $revision, - DifferentialCustomField::ROLE_COMMITMESSAGE); + PhabricatorCustomField::ROLE_STORAGE); + $custom_field_list ->setViewer($viewer) ->readFieldsFromStorage($revision); diff --git a/src/applications/differential/customfield/DifferentialAuditorsField.php b/src/applications/differential/customfield/DifferentialAuditorsField.php --- a/src/applications/differential/customfield/DifferentialAuditorsField.php +++ b/src/applications/differential/customfield/DifferentialAuditorsField.php @@ -36,10 +36,6 @@ return true; } - public function shouldAppearInCommitMessage() { - return true; - } - public function shouldAppearInConduitTransactions() { return true; } diff --git a/src/applications/differential/customfield/DifferentialBlameRevisionField.php b/src/applications/differential/customfield/DifferentialBlameRevisionField.php --- a/src/applications/differential/customfield/DifferentialBlameRevisionField.php +++ b/src/applications/differential/customfield/DifferentialBlameRevisionField.php @@ -91,10 +91,6 @@ $xaction->renderHandleLink($object_phid)); } - public function shouldAppearInCommitMessage() { - return true; - } - public function shouldAppearInConduitDictionary() { return true; } diff --git a/src/applications/differential/customfield/DifferentialCoreCustomField.php b/src/applications/differential/customfield/DifferentialCoreCustomField.php --- a/src/applications/differential/customfield/DifferentialCoreCustomField.php +++ b/src/applications/differential/customfield/DifferentialCoreCustomField.php @@ -156,15 +156,6 @@ return $this->value; } - public function readValueFromCommitMessage($value) { - $this->setValue($value); - return $this; - } - - public function renderCommitMessageValue(array $handles) { - return $this->getValue(); - } - public function getConduitDictionaryValue() { return $this->getValue(); } diff --git a/src/applications/differential/customfield/DifferentialCustomField.php b/src/applications/differential/customfield/DifferentialCustomField.php --- a/src/applications/differential/customfield/DifferentialCustomField.php +++ b/src/applications/differential/customfield/DifferentialCustomField.php @@ -7,9 +7,6 @@ abstract class DifferentialCustomField extends PhabricatorCustomField { - const ROLE_COMMITMESSAGE = 'differential:commitmessage'; - const ROLE_COMMITMESSAGEEDIT = 'differential:commitmessageedit'; - /** * TODO: It would be nice to remove this, but a lot of different code is * bound together by it. Until everything is modernized, retaining the old @@ -25,18 +22,6 @@ return $this->getFieldKeyForConduit(); } - public function shouldEnableForRole($role) { - switch ($role) { - case self::ROLE_COMMITMESSAGE: - return $this->shouldAppearInCommitMessage(); - case self::ROLE_COMMITMESSAGEEDIT: - return $this->shouldAppearInCommitMessage() && - $this->shouldAllowEditInCommitMessage(); - } - - return parent::shouldEnableForRole($role); - } - protected function parseObjectList( $value, array $types, @@ -100,39 +85,6 @@ /** * @task commitmessage */ - public function shouldAppearInCommitMessage() { - if ($this->getProxy()) { - return $this->getProxy()->shouldAppearInCommitMessage(); - } - return false; - } - - - /** - * @task commitmessage - */ - public function shouldAppearInCommitMessageTemplate() { - if ($this->getProxy()) { - return $this->getProxy()->shouldAppearInCommitMessageTemplate(); - } - return false; - } - - - /** - * @task commitmessage - */ - public function shouldAllowEditInCommitMessage() { - if ($this->getProxy()) { - return $this->getProxy()->shouldAllowEditInCommitMessage(); - } - return true; - } - - - /** - * @task commitmessage - */ public function getProTips() { if ($this->getProxy()) { return $this->getProxy()->getProTips(); @@ -141,95 +93,6 @@ } - /** - * @task commitmessage - */ - public function getCommitMessageLabels() { - if ($this->getProxy()) { - return $this->getProxy()->getCommitMessageLabels(); - } - return array($this->renderCommitMessageLabel()); - } - - - /** - * @task commitmessage - */ - public function parseValueFromCommitMessage($value) { - if ($this->getProxy()) { - return $this->getProxy()->parseValueFromCommitMessage($value); - } - return $value; - } - - - /** - * @task commitmessage - */ - public function readValueFromCommitMessage($value) { - if ($this->getProxy()) { - $this->getProxy()->readValueFromCommitMessage($value); - return $this; - } - return $this; - } - - - /** - * @task commitmessage - */ - public function shouldOverwriteWhenCommitMessageIsEdited() { - if ($this->getProxy()) { - return $this->getProxy()->shouldOverwriteWhenCommitMessageIsEdited(); - } - return false; - } - - - /** - * @task commitmessage - */ - public function getRequiredHandlePHIDsForCommitMessage() { - if ($this->getProxy()) { - return $this->getProxy()->getRequiredHandlePHIDsForCommitMessage(); - } - return array(); - } - - - /** - * @task commitmessage - */ - public function renderCommitMessageLabel() { - if ($this->getProxy()) { - return $this->getProxy()->renderCommitMessageLabel(); - } - return $this->getFieldName(); - } - - - /** - * @task commitmessage - */ - public function renderCommitMessageValue(array $handles) { - if ($this->getProxy()) { - return $this->getProxy()->renderCommitMessageValue($handles); - } - throw new PhabricatorCustomFieldImplementationIncompleteException($this); - } - - - /** - * @task commitmessage - */ - public function validateCommitMessageValue($value) { - if ($this->getProxy()) { - return $this->getProxy()->validateCommitMessageValue($value); - } - return; - } - - /* -( Integration with Diff Properties )----------------------------------- */ diff --git a/src/applications/differential/customfield/DifferentialJIRAIssuesField.php b/src/applications/differential/customfield/DifferentialJIRAIssuesField.php --- a/src/applications/differential/customfield/DifferentialJIRAIssuesField.php +++ b/src/applications/differential/customfield/DifferentialJIRAIssuesField.php @@ -270,39 +270,6 @@ $editor->save(); } - public function shouldAppearInCommitMessage() { - return true; - } - - public function shouldAppearInCommitMessageTemplate() { - return true; - } - - public function getCommitMessageLabels() { - return array( - 'JIRA', - 'JIRA Issues', - 'JIRA Issue', - ); - } - - public function parseValueFromCommitMessage($value) { - return preg_split('/[\s,]+/', $value, $limit = -1, PREG_SPLIT_NO_EMPTY); - } - - public function readValueFromCommitMessage($value) { - $this->setValue($value); - return $this; - } - - public function renderCommitMessageValue(array $handles) { - $value = $this->getValue(); - if (!$value) { - return null; - } - return implode(', ', $value); - } - public function shouldAppearInConduitDictionary() { return true; } diff --git a/src/applications/differential/customfield/DifferentialRevertPlanField.php b/src/applications/differential/customfield/DifferentialRevertPlanField.php --- a/src/applications/differential/customfield/DifferentialRevertPlanField.php +++ b/src/applications/differential/customfield/DifferentialRevertPlanField.php @@ -130,14 +130,6 @@ return array($xaction->getNewValue()); } - public function shouldAppearInCommitMessage() { - return true; - } - - public function renderCommitMessageValue(array $handles) { - return $this->getValue(); - } - public function shouldAppearInConduitDictionary() { return true; } diff --git a/src/applications/differential/field/DifferentialCommitMessageCustomField.php b/src/applications/differential/field/DifferentialCommitMessageCustomField.php --- a/src/applications/differential/field/DifferentialCommitMessageCustomField.php +++ b/src/applications/differential/field/DifferentialCommitMessageCustomField.php @@ -45,7 +45,7 @@ protected function getCustomFieldOrder($key) { $field_list = PhabricatorCustomField::getObjectFields( new DifferentialRevision(), - DifferentialCustomField::ROLE_COMMITMESSAGE); + PhabricatorCustomField::ROLE_DEFAULT); $fields = $field_list->getFields();