Page MenuHomePhabricator

D12515.diff
No OneTemporary

D12515.diff

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 @@
-<?php
-
-final class ArcanistUncommittedChangesException
- extends ArcanistUsageException {}
diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php
--- a/src/workflow/ArcanistDiffWorkflow.php
+++ b/src/workflow/ArcanistDiffWorkflow.php
@@ -626,40 +626,18 @@
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();
}
}

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 1:16 PM (11 h, 18 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6926415
Default Alt Text
D12515.diff (3 KB)

Event Timeline