diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -187,7 +187,6 @@ '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 @@ '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 --- 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(); } }