Page MenuHomePhabricator

D8468.id20079.diff
No OneTemporary

D8468.id20079.diff

diff --git a/conf/default.conf.php b/conf/default.conf.php
--- a/conf/default.conf.php
+++ b/conf/default.conf.php
@@ -796,20 +796,6 @@
'differential.field-selector' => 'DifferentialDefaultFieldSelector',
- // Differential can show "Host" and "Path" fields on revisions, with
- // information about the machine and working directory where the
- // change came from. These fields are disabled by default because they may
- // occasionally have sensitive information; you can set this to true to
- // enable them.
- 'differential.show-host-field' => false,
-
- // Differential has a required "Test Plan" field by default, which requires
- // authors to fill out information about how they verified the correctness of
- // their changes when sending code for review. If you'd prefer not to use
- // this field, you can disable it here. You can also make it optional
- // (instead of required) below.
- 'differential.show-test-plan-field' => true,
-
// Differential has a required "Test Plan" field by default. You can make it
// optional by setting this to false. You can also completely remove it above,
// if you prefer.
diff --git a/src/applications/config/check/PhabricatorSetupCheckExtraConfig.php b/src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
--- a/src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
+++ b/src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
@@ -150,6 +150,11 @@
'Sessions now expire and are garbage collected rather than having an '.
'arbitrary concurrency limit.');
+ $differential_field_reason = pht(
+ 'All Differential fields are now managed through the configuration '.
+ 'option "%s". Use that option to configure which fields are shown.',
+ 'differential.fields');
+
$ancient_config += array(
'phid.external-loaders' =>
pht(
@@ -182,6 +187,8 @@
'Phabricator now manages typeahead strategies automatically.'),
'differential.revision-custom-detail-renderer' => pht(
'Obsolete; use standard rendering events instead.'),
+ 'differential.show-host-field' => $differential_field_reason,
+ 'differential.show-test-plan-field' => $differential_field_reason,
);
return $ancient_config;
diff --git a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
--- a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
+++ b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
@@ -83,37 +83,6 @@
'DifferentialDefaultFieldSelector')
->setBaseClass('DifferentialFieldSelector')
->setDescription(pht('Field selector class')),
- $this->newOption('differential.show-host-field', 'bool', false)
- ->setBoolOptions(
- array(
- pht('Show "Host" Fields'),
- pht('Hide "Host" Fields'),
- ))
- ->setSummary(pht('Show or hide the "Host" and "Path" fields.'))
- ->setDescription(
- pht(
- 'Differential can show "Host" and "Path" fields on revisions, '.
- 'with information about the machine and working directory where '.
- 'the change came from. These fields are disabled by default '.
- 'because they may occasionally have sensitive information, but '.
- 'they can be useful if you work in an environment with shared '.
- 'development machines. You can set this option to true to enable '.
- 'these fields.')),
- $this->newOption('differential.show-test-plan-field', 'bool', true)
- ->setBoolOptions(
- array(
- pht('Show "Test Plan" Field'),
- pht('Hide "Test Plan" Field'),
- ))
- ->setSummary(pht('Show or hide the "Test Plan" field.'))
- ->setDescription(
- pht(
- 'Differential has a required "Test Plan" field by default, which '.
- 'requires authors to fill out information about how they verified '.
- 'the correctness of their changes when they send code for review. '.
- 'If you would prefer not to use this field, you can disable it '.
- 'here. You can also make it optional (instead of required) by '.
- 'setting {{differential.require-test-plan-field}}.')),
$this->newOption('differential.require-test-plan-field', 'bool', true)
->setBoolOptions(
array(
diff --git a/src/applications/differential/field/specification/DifferentialHostFieldSpecification.php b/src/applications/differential/field/specification/DifferentialHostFieldSpecification.php
--- a/src/applications/differential/field/specification/DifferentialHostFieldSpecification.php
+++ b/src/applications/differential/field/specification/DifferentialHostFieldSpecification.php
@@ -3,21 +3,4 @@
final class DifferentialHostFieldSpecification
extends DifferentialFieldSpecification {
- public function shouldAppearOnRevisionView() {
- return PhabricatorEnv::getEnvConfig('differential.show-host-field');
- }
-
- public function renderLabelForRevisionView() {
- return 'Host:';
- }
-
- public function renderValueForRevisionView() {
- $diff = $this->getManualDiff();
- $host = $diff->getSourceMachine();
- if (!$host) {
- return null;
- }
- return $host;
- }
-
}
diff --git a/src/applications/differential/field/specification/DifferentialPathFieldSpecification.php b/src/applications/differential/field/specification/DifferentialPathFieldSpecification.php
--- a/src/applications/differential/field/specification/DifferentialPathFieldSpecification.php
+++ b/src/applications/differential/field/specification/DifferentialPathFieldSpecification.php
@@ -3,23 +3,4 @@
final class DifferentialPathFieldSpecification
extends DifferentialFieldSpecification {
- public function shouldAppearOnRevisionView() {
- return PhabricatorEnv::getEnvConfig('differential.show-host-field');
- }
-
- public function renderLabelForRevisionView() {
- return 'Path:';
- }
-
- public function renderValueForRevisionView() {
- $diff = $this->getManualDiff();
-
- $path = $diff->getSourcePath();
- if (!$path) {
- return null;
- }
-
- return $path;
- }
-
}
diff --git a/src/applications/differential/field/specification/DifferentialTestPlanFieldSpecification.php b/src/applications/differential/field/specification/DifferentialTestPlanFieldSpecification.php
--- a/src/applications/differential/field/specification/DifferentialTestPlanFieldSpecification.php
+++ b/src/applications/differential/field/specification/DifferentialTestPlanFieldSpecification.php
@@ -9,7 +9,7 @@
private $error = false;
public function shouldAppearOnEdit() {
- return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
+ return false;
}
protected function didSetRevision() {
@@ -53,7 +53,7 @@
}
public function shouldAppearOnCommitMessage() {
- return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
+ return false;
}
public function getCommitMessageKey() {

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 12, 9:55 PM (17 h, 47 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6987883
Default Alt Text
D8468.id20079.diff (7 KB)

Event Timeline