mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-27 16:00:58 +01:00
Make "arc land --merge" an explicit error when targeting a Perforce remote
Summary: Ref T13434. Since "git p4 submit" gets more complicated when submitting merges, and empty merges (as with "--no-ff") seem to vanish, and it's not clear this is desirable or useful anyway, just make the "merge" strategy an explicit error with Perforce remotes. Test Plan: Ran "arc land --merge ..." in a Git/Perforce repository, got an explicit error. Ran "arc land --squash ...", got existing working behavior. Maniphest Tasks: T13434 Differential Revision: https://secure.phabricator.com/D20871
This commit is contained in:
parent
7383c2f4e6
commit
73943d1bc9
1 changed files with 9 additions and 1 deletions
|
@ -45,6 +45,14 @@ final class ArcanistGitLandEngine
|
|||
pht(
|
||||
'Operating in Git/Perforce mode after selecting a Perforce '.
|
||||
'remote.'));
|
||||
|
||||
if (!$this->getShouldSquash()) {
|
||||
throw new PhutilArgumentUsageException(
|
||||
pht(
|
||||
'Perforce mode does not support the "merge" land strategy. '.
|
||||
'Use the "squash" land strategy when landing to a Perforce '.
|
||||
'remote (you can use "--squash" to select this strategy).'));
|
||||
}
|
||||
}
|
||||
|
||||
$this->setTargetRemote($remote);
|
||||
|
@ -334,7 +342,7 @@ final class ArcanistGitLandEngine
|
|||
$flags_argv[] = '--conflict=quit';
|
||||
|
||||
$err = $api->execPassthru(
|
||||
'%LR p4 submit %LR --commit %s --',
|
||||
'%LR p4 submit %LR --commit %R --',
|
||||
$config_argv,
|
||||
$flags_argv,
|
||||
$this->mergedRef);
|
||||
|
|
Loading…
Reference in a new issue