diff --git a/src/land/engine/ArcanistMercurialLandEngine.php b/src/land/engine/ArcanistMercurialLandEngine.php index 32d1fa46..6a78c149 100644 --- a/src/land/engine/ArcanistMercurialLandEngine.php +++ b/src/land/engine/ArcanistMercurialLandEngine.php @@ -834,14 +834,19 @@ final class ArcanistMercurialLandEngine $argv[] = '--keep'; $argv[] = '--collapse'; - $future = $api->execFutureLocal('rebase %Ls', $argv); + $future = $api->execFutureLocalWithExtension( + 'rebase', + 'rebase %Ls', + $argv); $future->write($commit_message); $future->resolvex(); } catch (CommandException $ex) { // Aborting the rebase should restore the same state prior to running the // rebase command. - $api->execManualLocal('rebase --abort'); + $api->execManualLocalWithExtension( + 'rebase', + 'rebase --abort'); throw $ex; } @@ -1064,14 +1069,17 @@ final class ArcanistMercurialLandEngine // be deleted, we can skip this rebase? try { - $api->execxLocal( + $api->execxLocalWithExtension( + 'rebase', 'rebase --source %s --dest %s --keep --keepbranches', $child_hash, $new_commit); } catch (CommandException $ex) { // Aborting the rebase should restore the same state prior to running // the rebase command. - $api->execManualLocal('rebase --abort'); + $api->execManualLocalWithExtension( + 'rebase', + 'rebase --abort'); throw $ex; } } diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php index 9eecf0e2..55ef9ef5 100644 --- a/src/repository/api/ArcanistMercurialAPI.php +++ b/src/repository/api/ArcanistMercurialAPI.php @@ -1149,6 +1149,20 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI { $extended_args); } + public function execManualLocalWithExtension( + $extension, + $pattern /* , ... */) { + + $args = func_get_args(); + $extended_args = call_user_func_array( + array($this, 'buildMercurialExtensionCommand'), + $args); + + return call_user_func_array( + array($this, 'execManualLocal'), + $extended_args); + } + private function executeMercurialFeatureTest($feature, $resolve) { if (array_key_exists($feature, $this->featureResults)) { return $this->featureResults[$feature];