mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 00:42:40 +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:
parent
c04f141ab0
commit
165df12046
3 changed files with 4 additions and 4 deletions
|
@ -1355,7 +1355,7 @@ EOTEXT
|
|||
'Unit testing raised errors, but all '.
|
||||
'failing tests are unsound.'));
|
||||
} else {
|
||||
$continue = $this->console->confirm(
|
||||
$continue = phutil_console_confirm(
|
||||
pht(
|
||||
'Unit test results included failures, but all failing tests '.
|
||||
'are known to be unsound. Ignore unsound test failures?'));
|
||||
|
|
|
@ -1417,7 +1417,7 @@ EOTEXT
|
|||
pht('Harbormaster URI'),
|
||||
$buildable['uri']);
|
||||
|
||||
if (!$console->confirm($prompt)) {
|
||||
if (!phutil_console_confirm($prompt)) {
|
||||
throw new ArcanistUserAbortException();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -518,7 +518,7 @@ EOTEXT
|
|||
$prompt = pht(
|
||||
'Apply this patch to %s?',
|
||||
phutil_console_format('__%s__', $result->getPath()));
|
||||
if (!$console->confirm($prompt, $default = true)) {
|
||||
if (!phutil_console_confirm($prompt, $default_no = false)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ EOTEXT
|
|||
pht('Automatically amending HEAD with lint patches.'));
|
||||
$amend = true;
|
||||
} else {
|
||||
$amend = $console->confirm(pht('Amend HEAD with lint patches?'));
|
||||
$amend = phutil_console_confirm(pht('Amend HEAD with lint patches?'));
|
||||
}
|
||||
|
||||
if ($amend) {
|
||||
|
|
Loading…
Reference in a new issue