]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Remove unused ArcanistUncommittedChangesException class
authorJoshua Spence <josh@joshuaspence.com>
Sun, 3 May 2015 00:07:15 +0000 (10:07 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Sun, 3 May 2015 00:07:15 +0000 (10:07 +1000)
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

src/__phutil_library_map__.php
src/exception/usage/ArcanistUncommittedChangesException.php [deleted file]
src/workflow/ArcanistDiffWorkflow.php

index 2df4299e7ba3323de1866f3ea6f2ed88cb7cf1cf..097689f685a70afd71b9ec798ee107d409bfd7a1 100644 (file)
@@ -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 (file)
index 5baedf5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-
-final class ArcanistUncommittedChangesException
-  extends ArcanistUsageException {}
index d0a918c781f0632e4b42dd99b7cfb2101d364c54..78621a739d01bb96a8f11b171eaadde441d5aa3e 100644 (file)
@@ -626,40 +626,18 @@ EOTEXT
 
     if ($this->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();
       }
     }