$path = $change->getCurrentPath();
$fpath = $repository_api->getPath($path);
if (!@file_exists($fpath)) {
- $this->confirm(
+ $ok = phutil_console_confirm(
"Patch deletes file '{$path}', but the file does not exist in ".
"the working copy. Continue anyway?");
+ if (!$ok) {
+ throw new ArcanistUserAbortException();
+ }
} else {
$deletes[] = $change->getCurrentPath();
}
} else {
$verbs = 'moves';
}
- $this->confirm(
+ $ok = phutil_console_confirm(
"Patch {$verbs} '{$path}' to '{$cpath}', but source path ".
"does not exist in the working copy. Continue anyway?");
+ if (!$ok) {
+ throw new ArcanistUserAbortException();
+ }
} else {
$copies[] = array(
$change->getOldPath(),
phutil_require_module('arcanist', 'exception/usage');
+phutil_require_module('arcanist', 'exception/usage/userabort');
phutil_require_module('arcanist', 'parser/bundle');
phutil_require_module('arcanist', 'parser/diff/changetype');
phutil_require_module('arcanist', 'workflow/base');