Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistAmendWorkflow.php
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | if (!$is_show) { | ||||
| if (!$repository_api->supportsAmend()) { | if (!$repository_api->supportsAmend()) { | ||||
| throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
| "You may only run 'arc amend' in a git or hg (version ". | "You may only run 'arc amend' in a git or hg (version ". | ||||
| "2.2 or newer) working copy."); | "2.2 or newer) working copy."); | ||||
| } | } | ||||
| if ($this->isHistoryImmutable()) { | if ($this->isHistoryImmutable()) { | ||||
| throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
| "This project is marked as adhering to a conservative history ". | 'This project is marked as adhering to a conservative history '. | ||||
| "mutability doctrine (having an immutable local history), which ". | 'mutability doctrine (having an immutable local history), which '. | ||||
| "precludes amending commit messages."); | 'precludes amending commit messages.'); | ||||
| } | } | ||||
| if ($repository_api->getUncommittedChanges()) { | if ($repository_api->getUncommittedChanges()) { | ||||
| throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
| "You have uncommitted changes in this branch. Stage and commit (or ". | 'You have uncommitted changes in this branch. Stage and commit (or '. | ||||
| "revert) them before proceeding."); | 'revert) them before proceeding.'); | ||||
| } | } | ||||
| } | } | ||||
| $revision_id = null; | $revision_id = null; | ||||
| if ($this->getArgument('revision')) { | if ($this->getArgument('revision')) { | ||||
| $revision_id = $this->normalizeRevisionID($this->getArgument('revision')); | $revision_id = $this->normalizeRevisionID($this->getArgument('revision')); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines | |||||