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

Consistently use phutil_console_confirm().

Summary:
`PhutilConsole->confirm()` is vestigial as noted in efcd70c, as
`PhutilConsole` may be deprecated sometime in the future. `PhutilConsole`
was developed as a tool for T4281 but the feature has been removed
since.

Replace existing occurences of the `PhutilConsole->confirm()` pattern with
`phutil_console_confirm()`. There should be no change in functionality
since the two functions are interchangeable.

Test Plan: Manually tested by running `bin/arc lint`, `bin/arc diff --preview`, `bin/arc land --preview`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, alexmv

Differential Revision: https://secure.phabricator.com/D18185
This commit is contained in:
Stephanie Ren 2017-07-05 19:09:31 -07:00
parent c04f141ab0
commit 165df12046
3 changed files with 4 additions and 4 deletions

View file

@ -1355,7 +1355,7 @@ EOTEXT
'Unit testing raised errors, but all '. 'Unit testing raised errors, but all '.
'failing tests are unsound.')); 'failing tests are unsound.'));
} else { } else {
$continue = $this->console->confirm( $continue = phutil_console_confirm(
pht( pht(
'Unit test results included failures, but all failing tests '. 'Unit test results included failures, but all failing tests '.
'are known to be unsound. Ignore unsound test failures?')); 'are known to be unsound. Ignore unsound test failures?'));

View file

@ -1417,7 +1417,7 @@ EOTEXT
pht('Harbormaster URI'), pht('Harbormaster URI'),
$buildable['uri']); $buildable['uri']);
if (!$console->confirm($prompt)) { if (!phutil_console_confirm($prompt)) {
throw new ArcanistUserAbortException(); throw new ArcanistUserAbortException();
} }
} }

View file

@ -518,7 +518,7 @@ EOTEXT
$prompt = pht( $prompt = pht(
'Apply this patch to %s?', 'Apply this patch to %s?',
phutil_console_format('__%s__', $result->getPath())); phutil_console_format('__%s__', $result->getPath()));
if (!$console->confirm($prompt, $default = true)) { if (!phutil_console_confirm($prompt, $default_no = false)) {
continue; continue;
} }
} }
@ -546,7 +546,7 @@ EOTEXT
pht('Automatically amending HEAD with lint patches.')); pht('Automatically amending HEAD with lint patches.'));
$amend = true; $amend = true;
} else { } else {
$amend = $console->confirm(pht('Amend HEAD with lint patches?')); $amend = phutil_console_confirm(pht('Amend HEAD with lint patches?'));
} }
if ($amend) { if ($amend) {