1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00

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
This commit is contained in:
epriestley 2014-03-09 10:24:54 -07:00
parent 9e8bbdb3a2
commit 77af6be803
6 changed files with 9 additions and 83 deletions

View file

@ -796,20 +796,6 @@ return array(
'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.

View file

@ -150,6 +150,11 @@ final class PhabricatorSetupCheckExtraConfig extends PhabricatorSetupCheck {
'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 @@ final class PhabricatorSetupCheckExtraConfig extends PhabricatorSetupCheck {
'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;

View file

@ -83,37 +83,6 @@ final class PhabricatorDifferentialConfigOptions
'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(

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -9,7 +9,7 @@ final class DifferentialTestPlanFieldSpecification
private $error = false;
public function shouldAppearOnEdit() {
return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
return false;
}
protected function didSetRevision() {
@ -53,7 +53,7 @@ final class DifferentialTestPlanFieldSpecification
}
public function shouldAppearOnCommitMessage() {
return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
return false;
}
public function getCommitMessageKey() {