mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Fix sanity checks for patch workflow
Summary: Ref T7604. Ref T8307. This was broken in D12962 because I only tested `arc patch --arcbundle`. Furthermore, this particular sanity check doesn't actually do anything now (see T8307). Test Plan: Ran `arc patch --nobranch D12971` successfully. Auditors: epriestley
This commit is contained in:
parent
be9dd352be
commit
1f2b51c4a3
1 changed files with 0 additions and 29 deletions
|
@ -954,35 +954,6 @@ EOTEXT
|
|||
private function sanityCheck(ArcanistBundle $bundle) {
|
||||
$repository_api = $this->getRepositoryAPI();
|
||||
|
||||
// Check to see if the bundle's project id matches the working copy
|
||||
// project id
|
||||
$bundle_project_id = $bundle->getProjectID();
|
||||
$working_copy_project_id = $this->getWorkingCopy()->getProjectID();
|
||||
if (empty($bundle_project_id)) {
|
||||
// this means $source is SOURCE_PATCH || SOURCE_BUNDLE w/ $version = 0
|
||||
// they don't come with a project id so just do nothing
|
||||
} else if ($bundle_project_id != $working_copy_project_id) {
|
||||
if ($working_copy_project_id) {
|
||||
$issue = pht(
|
||||
"This patch is for the '%s' project, but the working copy ".
|
||||
"belongs to the '%s' project.",
|
||||
$bundle_project_id,
|
||||
$working_copy_project_id);
|
||||
} else {
|
||||
$issue = pht(
|
||||
"This patch is for the '%s' project, but the working copy does ".
|
||||
"not have an '%s' file to identify which project it belongs to.",
|
||||
$bundle_project_id,
|
||||
'.arcconfig');
|
||||
}
|
||||
$ok = phutil_console_confirm(
|
||||
pht('%s Still try to apply the patch?', $issue),
|
||||
$default_no = false);
|
||||
if (!$ok) {
|
||||
throw new ArcanistUserAbortException();
|
||||
}
|
||||
}
|
||||
|
||||
// Check to see if the bundle's base revision matches the working copy
|
||||
// base revision
|
||||
if ($repository_api->supportsLocalCommits()) {
|
||||
|
|
Loading…
Reference in a new issue