Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
| Show First 20 Lines • Show All 932 Lines • ▼ Show 20 Lines | if ($untracked) { | ||||
| echo sprintf( | echo sprintf( | ||||
| "%s\n\n%s", | "%s\n\n%s", | ||||
| pht('You have untracked files in this working copy.'), | pht('You have untracked files in this working copy.'), | ||||
| $working_copy_desc); | $working_copy_desc); | ||||
| if ($api instanceof ArcanistGitAPI) { | if ($api instanceof ArcanistGitAPI) { | ||||
| $hint = pht( | $hint = pht( | ||||
| '(To ignore these %s change(s), add them to "%s".)', | '(To ignore these %s change(s), add them to "%s".)', | ||||
| new PhutilNumber(count($untracked)), | phutil_count($untracked), | ||||
| '.git/info/exclude'); | '.git/info/exclude'); | ||||
| } else if ($api instanceof ArcanistSubversionAPI) { | } else if ($api instanceof ArcanistSubversionAPI) { | ||||
| $hint = pht( | $hint = pht( | ||||
| '(To ignore these %s change(s), add them to "%s".)', | '(To ignore these %s change(s), add them to "%s".)', | ||||
| new PhutilNumber(count($untracked)), | phutil_count($untracked), | ||||
| 'svn:ignore'); | 'svn:ignore'); | ||||
| } else if ($api instanceof ArcanistMercurialAPI) { | } else if ($api instanceof ArcanistMercurialAPI) { | ||||
| $hint = pht( | $hint = pht( | ||||
| '(To ignore these %s change(s), add them to "%s".)', | '(To ignore these %s change(s), add them to "%s".)', | ||||
| new PhutilNumber(count($untracked)), | phutil_count($untracked), | ||||
| '.hgignore'); | '.hgignore'); | ||||
| } | } | ||||
| $untracked_list = " ".implode("\n ", $untracked); | $untracked_list = " ".implode("\n ", $untracked); | ||||
| echo sprintf( | echo sprintf( | ||||
| " %s\n %s\n%s", | " %s\n %s\n%s", | ||||
| pht('Untracked changes in working copy:'), | pht('Untracked changes in working copy:'), | ||||
| $hint, | $hint, | ||||
| $untracked_list); | $untracked_list); | ||||
| $prompt = pht( | $prompt = pht( | ||||
| 'Ignore these %s untracked file(s) and continue?', | 'Ignore these %s untracked file(s) and continue?', | ||||
| new PhutilNumber(count($untracked))); | phutil_count($untracked)); | ||||
| if (!phutil_console_confirm($prompt)) { | if (!phutil_console_confirm($prompt)) { | ||||
| throw new ArcanistUserAbortException(); | throw new ArcanistUserAbortException(); | ||||
| } | } | ||||
| } | } | ||||
| $should_commit = false; | $should_commit = false; | ||||
| ▲ Show 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | private function askForAdd(array $files) { | ||||
| $prompt = $this->getAskForAddPrompt($files); | $prompt = $this->getAskForAddPrompt($files); | ||||
| return phutil_console_confirm($prompt); | return phutil_console_confirm($prompt); | ||||
| } | } | ||||
| private function getAskForAddPrompt(array $files) { | private function getAskForAddPrompt(array $files) { | ||||
| if ($this->getShouldAmend()) { | if ($this->getShouldAmend()) { | ||||
| $prompt = pht( | $prompt = pht( | ||||
| 'Do you want to amend these %s change(s) to the current commit?', | 'Do you want to amend these %s change(s) to the current commit?', | ||||
| new PhutilNumber(count($files))); | phutil_count($files)); | ||||
| } else { | } else { | ||||
| $prompt = pht( | $prompt = pht( | ||||
| 'Do you want to create a new commit with these %s change(s)?', | 'Do you want to create a new commit with these %s change(s)?', | ||||
| new PhutilNumber(count($files))); | phutil_count($files)); | ||||
| } | } | ||||
| return $prompt; | return $prompt; | ||||
| } | } | ||||
| final protected function loadDiffBundleFromConduit( | final protected function loadDiffBundleFromConduit( | ||||
| ConduitClient $conduit, | ConduitClient $conduit, | ||||
| $diff_id) { | $diff_id) { | ||||
| ▲ Show 20 Lines • Show All 887 Lines • Show Last 20 Lines | |||||