diff --git a/src/applications/diffusion/editor/DiffusionCommitEditEngine.php b/src/applications/diffusion/editor/DiffusionCommitEditEngine.php index 87c1ba2ed8..904ef2abad 100644 --- a/src/applications/diffusion/editor/DiffusionCommitEditEngine.php +++ b/src/applications/diffusion/editor/DiffusionCommitEditEngine.php @@ -125,9 +125,9 @@ final class DiffusionCommitEditEngine case PhabricatorRepository::BECAUSE_NOT_ON_AUTOCLOSE_BRANCH: $desc = pht('No, Not Reachable from Permanent Ref'); break; - case PhabricatorRepository::BECAUSE_AUTOCLOSE_FORCED: - $desc = pht('Yes, Forced Via bin/repository CLI Tool.'); - break; + // Old commits which were manually reparsed with "--force-autoclose" + // may have this constant. This flag is no longer supported. + case 'auto/forced': case null: $desc = pht('Yes'); break; diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php index ea9f4a6eb4..6a2384206e 100644 --- a/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php +++ b/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php @@ -88,13 +88,6 @@ final class PhabricatorRepositoryManagementReparseWorkflow 'help' => pht( '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( 'commitID' => $commit->getID(), 'only' => !$importing, - 'forceAutoclose' => $args->getArg('force-autoclose'), ); if ($all_from_repo && !$force_local) { diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index 9d76271369..c0622fc160 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -47,7 +47,6 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO const BECAUSE_NOT_ON_AUTOCLOSE_BRANCH = 'auto/nobranch'; const BECAUSE_BRANCH_UNTRACKED = 'auto/notrack'; const BECAUSE_BRANCH_NOT_AUTOCLOSE = 'auto/noclose'; - const BECAUSE_AUTOCLOSE_FORCED = 'auto/forced'; const STATUS_ACTIVE = 'active'; const STATUS_INACTIVE = 'inactive'; diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php index cbb67599d6..82e89e3b39 100644 --- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php +++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php @@ -162,20 +162,9 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker // aren't. Autoclose can be disabled for various reasons at the repository // 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); - $should_autoclose = $force_autoclose || - $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). + $should_autoclose = $repository->shouldAutocloseCommit($commit); if ($should_autoclose) { $actor = PhabricatorUser::getOmnipotentUser();