diff --git a/src/land/UberArcanistStackSubmitQueueEngine.php b/src/land/UberArcanistStackSubmitQueueEngine.php index 41c098c94..c02435f2b 100644 --- a/src/land/UberArcanistStackSubmitQueueEngine.php +++ b/src/land/UberArcanistStackSubmitQueueEngine.php @@ -350,11 +350,8 @@ protected function pushChangeToSubmitQueue() { pht('PUSHING'), pht('Pushing changes to Submit Queue.')); $api = $this->getRepositoryAPI(); - list($out) = $api->execxLocal( - 'config --get remote.%s.url', - $this->getTargetRemote()); + $remoteUrl = $api->uberGetGitRemotePushUrl($this->getTargetRemote()); - $remoteUrl = trim($out); $stack = $this->generateRevisionDiffMappingForLanding(); $statusUrl = $this->submitQueueClient->submitMergeStackRequest( $remoteUrl, diff --git a/src/land/UberArcanistSubmitQueueEngine.php b/src/land/UberArcanistSubmitQueueEngine.php index 5ca5bfa0d..cc7f06df8 100644 --- a/src/land/UberArcanistSubmitQueueEngine.php +++ b/src/land/UberArcanistSubmitQueueEngine.php @@ -94,11 +94,8 @@ protected function pushChangeToSubmitQueue() { pht('PUSHING'), pht('Pushing changes to Submit Queue.')); $api = $this->getRepositoryAPI(); - list($out) = $api->execxLocal( - 'config --get remote.%s.url', - $this->getTargetRemote()); + $remoteUrl = $api->uberGetGitRemotePushUrl($this->getTargetRemote()); - $remoteUrl = trim($out); // Get the latest revision as we could have updated the diff // as a result of arc diff $revision = $this->getRevision(); diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php index 56b38cb83..d70f25cc9 100644 --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -1606,4 +1606,20 @@ public function uberHasGitSubmodules() { } return (bool)strlen(trim($out)); } + + /** + * Get the remote push url for a repository + */ + public function uberGetGitRemotePushUrl($remote) { + try { + list($out) = $this->execxLocal( + 'config --get remote.%s.pushurl', + $remote); + return trim($out); + } catch (CommandException $ex) {} + list($out) = $this->execxLocal( + 'config --get remote.%s.url', + $remote); + return trim($out); + } }