'Do you want to mark these files as binary and continue?',
),
+ 'Do you want to amend these files to the commit?' => array(
+ 'Do you want to amend this file to the commit?',
+ 'Do you want to amend these files to the commit?',
+ ),
+
+ 'Do you want to add these files to the commit?' => array(
+ 'Do you want to add this file to the commit?',
+ 'Do you want to add these files to the commit?',
+ ),
+
'line(s)' => array('line', 'lines'),
'%d test(s)' => array('%d test', '%d tests'),
"may have forgotten to 'hg add' them to your commit.\n");
}
- if ($this->askForAdd()) {
+ if ($this->askForAdd($untracked)) {
$api->addToCommit($untracked);
$must_commit += array_flip($untracked);
} else if ($this->commitMode == self::COMMIT_DISABLE) {
$working_copy_desc.
" Unstaged changes in working copy:\n".
" ".implode("\n ", $unstaged)."\n";
- if ($this->askForAdd()) {
+ if ($this->askForAdd($unstaged)) {
$api->addToCommit($unstaged);
$must_commit += array_flip($unstaged);
} else {
$working_copy_desc.
" Uncommitted changes in working copy:\n".
" ".implode("\n ", $uncommitted)."\n";
- if ($this->askForAdd()) {
+ if ($this->askForAdd($uncommitted)) {
$must_commit += array_flip($uncommitted);
} else {
throw new ArcanistUncommittedChangesException(
return false;
}
- private function askForAdd() {
+ private function askForAdd(array $files) {
if ($this->commitMode == self::COMMIT_DISABLE) {
return false;
}
return true;
}
if ($this->shouldAmend) {
- $prompt = "Do you want to amend these files to the commit?";
+ $prompt = pht(
+ 'Do you want to amend these files to the commit?',
+ count($files));
} else {
- $prompt = "Do you want to add these files to the commit?";
+ $prompt = pht(
+ 'Do you want to add these files to the commit?',
+ count($files));
}
return phutil_console_confirm($prompt);
}