1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-10 00:42:40 +01:00

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
This commit is contained in:
Joshua Spence 2015-05-03 10:07:15 +10:00
parent eb5621c998
commit 977baacc32
3 changed files with 12 additions and 40 deletions

View 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',

View file

@ -1,4 +0,0 @@
<?php
final class ArcanistUncommittedChangesException
extends ArcanistUsageException {}

View 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();
}
}