From: Joshua Spence Date: Sun, 3 May 2015 00:07:15 +0000 (+1000) Subject: Remove unused ArcanistUncommittedChangesException class X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=977baacc329ce690d4e5c0304f4c50e352e7644f;p=arcanist.git Remove unused ArcanistUncommittedChangesException class Summary: Remove the `ArcanistUncommittedChangesException` class which is unused after D11843. Test Plan: `grep` Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12515 --- diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 2df4299e..097689f6 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -187,7 +187,6 @@ phutil_register_library_map(array( 'ArcanistTimeWorkflow' => 'workflow/ArcanistTimeWorkflow.php', 'ArcanistTodoWorkflow' => 'workflow/ArcanistTodoWorkflow.php', 'ArcanistUSEnglishTranslation' => 'internationalization/ArcanistUSEnglishTranslation.php', - 'ArcanistUncommittedChangesException' => 'exception/usage/ArcanistUncommittedChangesException.php', 'ArcanistUnitConsoleRenderer' => 'unit/renderer/ArcanistUnitConsoleRenderer.php', 'ArcanistUnitRenderer' => 'unit/renderer/ArcanistUnitRenderer.php', 'ArcanistUnitTestEngine' => 'unit/engine/ArcanistUnitTestEngine.php', @@ -372,7 +371,6 @@ phutil_register_library_map(array( 'ArcanistTimeWorkflow' => 'ArcanistPhrequentWorkflow', 'ArcanistTodoWorkflow' => 'ArcanistWorkflow', 'ArcanistUSEnglishTranslation' => 'PhutilTranslation', - 'ArcanistUncommittedChangesException' => 'ArcanistUsageException', 'ArcanistUnitConsoleRenderer' => 'ArcanistUnitRenderer', 'ArcanistUnitTestableLintEngine' => 'ArcanistLintEngine', 'ArcanistUnitWorkflow' => 'ArcanistWorkflow', diff --git a/src/exception/usage/ArcanistUncommittedChangesException.php b/src/exception/usage/ArcanistUncommittedChangesException.php deleted file mode 100644 index 5baedf52..00000000 --- a/src/exception/usage/ArcanistUncommittedChangesException.php +++ /dev/null @@ -1,4 +0,0 @@ -requiresWorkingCopy()) { $repository_api = $this->getRepositoryAPI(); - try { - if ($this->getArgument('add-all')) { - $this->setCommitMode(self::COMMIT_ENABLE); - } else if ($this->getArgument('uncommitted')) { - $this->setCommitMode(self::COMMIT_DISABLE); - } else { - $this->setCommitMode(self::COMMIT_ALLOW); - } - if ($repository_api instanceof ArcanistSubversionAPI) { - $repository_api->limitStatusToPaths($this->getArgument('paths')); - } - if (!$this->getArgument('head')) { - $this->requireCleanWorkingCopy(); - } - } catch (ArcanistUncommittedChangesException $ex) { - if ($repository_api instanceof ArcanistMercurialAPI) { - $use_dirty_changes = false; - if ($this->getArgument('uncommitted')) { - // OK. - } else { - $ok = phutil_console_confirm( - "You have uncommitted changes in your working copy. You can ". - "include them in the diff, or abort and deal with them. (Use ". - "'--uncommitted' to include them and skip this prompt.) ". - "Do you want to include uncommitted changes in the diff?"); - if (!$ok) { - throw $ex; - } - } - - $this->haveUncommittedChanges = true; - } else { - throw $ex; - } + if ($this->getArgument('add-all')) { + $this->setCommitMode(self::COMMIT_ENABLE); + } else if ($this->getArgument('uncommitted')) { + $this->setCommitMode(self::COMMIT_DISABLE); + } else { + $this->setCommitMode(self::COMMIT_ALLOW); + } + if ($repository_api instanceof ArcanistSubversionAPI) { + $repository_api->limitStatusToPaths($this->getArgument('paths')); + } + if (!$this->getArgument('head')) { + $this->requireCleanWorkingCopy(); } }