Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistUpgradeWorkflow.php
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | foreach ($roots as $library => $root) { | ||||
$working_copy = ArcanistWorkingCopy::newFromWorkingDirectory($root); | $working_copy = ArcanistWorkingCopy::newFromWorkingDirectory($root); | ||||
$repository_api = $working_copy->getRepositoryAPI(); | $repository_api = $working_copy->getRepositoryAPI(); | ||||
$is_git = ($repository_api instanceof ArcanistGitAPI); | $is_git = ($repository_api instanceof ArcanistGitAPI); | ||||
if (!$is_git) { | if (!$is_git) { | ||||
throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
pht( | pht( | ||||
'The "arc upgrade" workflow uses "git pull" to upgrade, but '. | 'The "upgrade" workflow uses "git pull" to upgrade, but '. | ||||
'the "arcanist/" directory (in "%s") is not a Git working '. | 'the software directory (in "%s") is not a Git working '. | ||||
'copy. You must leave "arcanist/" as a Git working copy to '. | 'copy. You must leave this directory as a Git working copy to '. | ||||
'use "arc upgrade".', | 'use "arc upgrade".', | ||||
$root)); | $root)); | ||||
} | } | ||||
// NOTE: Don't use requireCleanWorkingCopy() here because it tries to | // NOTE: Don't use requireCleanWorkingCopy() here because it tries to | ||||
// amend changes and generally move the workflow forward. We just want to | // amend changes and generally move the workflow forward. We just want to | ||||
// abort if there are local changes and make the user sort things out. | // abort if there are local changes and make the user sort things out. | ||||
$uncommitted = $repository_api->getUncommittedStatus(); | $uncommitted = $repository_api->getUncommittedStatus(); | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |