Skip to content

Commit 77af6be

Browse files
author
epriestley
committedMar 11, 2014
Remove host/path and test plan enable/disable options
Summary: Ref T2222. These no longer have an effect, and are obsoleted by `differential.fields`. Test Plan: `grep` Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2222 Differential Revision: https://secure.phabricator.com/D8468
1 parent 9e8bbdb commit 77af6be

6 files changed

+9
-83
lines changed
 

‎conf/default.conf.php

-14
Original file line numberDiff line numberDiff line change
@@ -796,20 +796,6 @@
796796

797797
'differential.field-selector' => 'DifferentialDefaultFieldSelector',
798798

799-
// Differential can show "Host" and "Path" fields on revisions, with
800-
// information about the machine and working directory where the
801-
// change came from. These fields are disabled by default because they may
802-
// occasionally have sensitive information; you can set this to true to
803-
// enable them.
804-
'differential.show-host-field' => false,
805-
806-
// Differential has a required "Test Plan" field by default, which requires
807-
// authors to fill out information about how they verified the correctness of
808-
// their changes when sending code for review. If you'd prefer not to use
809-
// this field, you can disable it here. You can also make it optional
810-
// (instead of required) below.
811-
'differential.show-test-plan-field' => true,
812-
813799
// Differential has a required "Test Plan" field by default. You can make it
814800
// optional by setting this to false. You can also completely remove it above,
815801
// if you prefer.

‎src/applications/config/check/PhabricatorSetupCheckExtraConfig.php

+7
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ public static function getAncientConfig() {
150150
'Sessions now expire and are garbage collected rather than having an '.
151151
'arbitrary concurrency limit.');
152152

153+
$differential_field_reason = pht(
154+
'All Differential fields are now managed through the configuration '.
155+
'option "%s". Use that option to configure which fields are shown.',
156+
'differential.fields');
157+
153158
$ancient_config += array(
154159
'phid.external-loaders' =>
155160
pht(
@@ -182,6 +187,8 @@ public static function getAncientConfig() {
182187
'Phabricator now manages typeahead strategies automatically.'),
183188
'differential.revision-custom-detail-renderer' => pht(
184189
'Obsolete; use standard rendering events instead.'),
190+
'differential.show-host-field' => $differential_field_reason,
191+
'differential.show-test-plan-field' => $differential_field_reason,
185192
);
186193

187194
return $ancient_config;

‎src/applications/differential/config/PhabricatorDifferentialConfigOptions.php

-31
Original file line numberDiff line numberDiff line change
@@ -83,37 +83,6 @@ public function getOptions() {
8383
'DifferentialDefaultFieldSelector')
8484
->setBaseClass('DifferentialFieldSelector')
8585
->setDescription(pht('Field selector class')),
86-
$this->newOption('differential.show-host-field', 'bool', false)
87-
->setBoolOptions(
88-
array(
89-
pht('Show "Host" Fields'),
90-
pht('Hide "Host" Fields'),
91-
))
92-
->setSummary(pht('Show or hide the "Host" and "Path" fields.'))
93-
->setDescription(
94-
pht(
95-
'Differential can show "Host" and "Path" fields on revisions, '.
96-
'with information about the machine and working directory where '.
97-
'the change came from. These fields are disabled by default '.
98-
'because they may occasionally have sensitive information, but '.
99-
'they can be useful if you work in an environment with shared '.
100-
'development machines. You can set this option to true to enable '.
101-
'these fields.')),
102-
$this->newOption('differential.show-test-plan-field', 'bool', true)
103-
->setBoolOptions(
104-
array(
105-
pht('Show "Test Plan" Field'),
106-
pht('Hide "Test Plan" Field'),
107-
))
108-
->setSummary(pht('Show or hide the "Test Plan" field.'))
109-
->setDescription(
110-
pht(
111-
'Differential has a required "Test Plan" field by default, which '.
112-
'requires authors to fill out information about how they verified '.
113-
'the correctness of their changes when they send code for review. '.
114-
'If you would prefer not to use this field, you can disable it '.
115-
'here. You can also make it optional (instead of required) by '.
116-
'setting {{differential.require-test-plan-field}}.')),
11786
$this->newOption('differential.require-test-plan-field', 'bool', true)
11887
->setBoolOptions(
11988
array(

‎src/applications/differential/field/specification/DifferentialHostFieldSpecification.php

-17
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,4 @@
33
final class DifferentialHostFieldSpecification
44
extends DifferentialFieldSpecification {
55

6-
public function shouldAppearOnRevisionView() {
7-
return PhabricatorEnv::getEnvConfig('differential.show-host-field');
8-
}
9-
10-
public function renderLabelForRevisionView() {
11-
return 'Host:';
12-
}
13-
14-
public function renderValueForRevisionView() {
15-
$diff = $this->getManualDiff();
16-
$host = $diff->getSourceMachine();
17-
if (!$host) {
18-
return null;
19-
}
20-
return $host;
21-
}
22-
236
}

‎src/applications/differential/field/specification/DifferentialPathFieldSpecification.php

-19
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,4 @@
33
final class DifferentialPathFieldSpecification
44
extends DifferentialFieldSpecification {
55

6-
public function shouldAppearOnRevisionView() {
7-
return PhabricatorEnv::getEnvConfig('differential.show-host-field');
8-
}
9-
10-
public function renderLabelForRevisionView() {
11-
return 'Path:';
12-
}
13-
14-
public function renderValueForRevisionView() {
15-
$diff = $this->getManualDiff();
16-
17-
$path = $diff->getSourcePath();
18-
if (!$path) {
19-
return null;
20-
}
21-
22-
return $path;
23-
}
24-
256
}

‎src/applications/differential/field/specification/DifferentialTestPlanFieldSpecification.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ final class DifferentialTestPlanFieldSpecification
99
private $error = false;
1010

1111
public function shouldAppearOnEdit() {
12-
return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
12+
return false;
1313
}
1414

1515
protected function didSetRevision() {
@@ -53,7 +53,7 @@ public function validateField() {
5353
}
5454

5555
public function shouldAppearOnCommitMessage() {
56-
return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
56+
return false;
5757
}
5858

5959
public function getCommitMessageKey() {

0 commit comments

Comments
 (0)
Failed to load comments.