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

Remove "--force-autoclose" from "bin/repository reparse"

Summary: Depends on D20463. Ref T13277. This flag was added some time before 2015 and I don't think I've ever used it. Just get rid of it.

Test Plan: Grepped for `force-autoclose`, `forceAutoclose`, `AUTOCLOSE_FORCED`.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13277

Differential Revision: https://secure.phabricator.com/D20464
This commit is contained in:
epriestley 2019-04-22 16:08:37 -07:00
parent a2d3d8edeb
commit 45b9859f02
4 changed files with 5 additions and 25 deletions

View file

@ -125,9 +125,9 @@ final class DiffusionCommitEditEngine
case PhabricatorRepository::BECAUSE_NOT_ON_AUTOCLOSE_BRANCH: case PhabricatorRepository::BECAUSE_NOT_ON_AUTOCLOSE_BRANCH:
$desc = pht('No, Not Reachable from Permanent Ref'); $desc = pht('No, Not Reachable from Permanent Ref');
break; break;
case PhabricatorRepository::BECAUSE_AUTOCLOSE_FORCED: // Old commits which were manually reparsed with "--force-autoclose"
$desc = pht('Yes, Forced Via bin/repository CLI Tool.'); // may have this constant. This flag is no longer supported.
break; case 'auto/forced':
case null: case null:
$desc = pht('Yes'); $desc = pht('Yes');
break; break;

View file

@ -88,13 +88,6 @@ final class PhabricatorRepositoryManagementReparseWorkflow
'help' => pht( 'help' => pht(
'Reparse all steps which have not yet completed.'), 'Reparse all steps which have not yet completed.'),
), ),
array(
'name' => 'force-autoclose',
'help' => pht(
'Only used with __%s__, use this to make sure any '.
'pertinent diffs are closed regardless of configuration.',
'--message'),
),
)); ));
} }
@ -307,7 +300,6 @@ final class PhabricatorRepositoryManagementReparseWorkflow
$spec = array( $spec = array(
'commitID' => $commit->getID(), 'commitID' => $commit->getID(),
'only' => !$importing, 'only' => !$importing,
'forceAutoclose' => $args->getArg('force-autoclose'),
); );
if ($all_from_repo && !$force_local) { if ($all_from_repo && !$force_local) {

View file

@ -47,7 +47,6 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
const BECAUSE_NOT_ON_AUTOCLOSE_BRANCH = 'auto/nobranch'; const BECAUSE_NOT_ON_AUTOCLOSE_BRANCH = 'auto/nobranch';
const BECAUSE_BRANCH_UNTRACKED = 'auto/notrack'; const BECAUSE_BRANCH_UNTRACKED = 'auto/notrack';
const BECAUSE_BRANCH_NOT_AUTOCLOSE = 'auto/noclose'; const BECAUSE_BRANCH_NOT_AUTOCLOSE = 'auto/noclose';
const BECAUSE_AUTOCLOSE_FORCED = 'auto/forced';
const STATUS_ACTIVE = 'active'; const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive'; const STATUS_INACTIVE = 'inactive';

View file

@ -162,20 +162,9 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
// aren't. Autoclose can be disabled for various reasons at the repository // aren't. Autoclose can be disabled for various reasons at the repository
// or commit levels. // or commit levels.
$force_autoclose = idx($this->getTaskData(), 'forceAutoclose', false);
if ($force_autoclose) {
$autoclose_reason = PhabricatorRepository::BECAUSE_AUTOCLOSE_FORCED;
} else {
$autoclose_reason = $repository->shouldSkipAutocloseCommit($commit); $autoclose_reason = $repository->shouldSkipAutocloseCommit($commit);
}
$data->setCommitDetail('autocloseReason', $autoclose_reason); $data->setCommitDetail('autocloseReason', $autoclose_reason);
$should_autoclose = $force_autoclose || $should_autoclose = $repository->shouldAutocloseCommit($commit);
$repository->shouldAutocloseCommit($commit);
// When updating related objects, we'll act under an omnipotent user to
// ensure we can see them, but take actions as either the committer or
// author (if we recognize their accounts) or the Diffusion application
// (if we do not).
if ($should_autoclose) { if ($should_autoclose) {
$actor = PhabricatorUser::getOmnipotentUser(); $actor = PhabricatorUser::getOmnipotentUser();