mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-23 07:12:40 +01:00
Allow running arc land
after git svn rebase
Summary: `git pull` may fail in git-svn after rebasing (which is a side effect of dcommit). Test Plan: $ git svn rebase $ git log trunk..master $ git pull --ff-only; echo $? Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4716
This commit is contained in:
parent
410b58a2e2
commit
0586b12d2f
1 changed files with 9 additions and 3 deletions
|
@ -384,17 +384,23 @@ EOTEXT
|
||||||
|
|
||||||
$local_ahead_of_remote = false;
|
$local_ahead_of_remote = false;
|
||||||
if ($this->isGit) {
|
if ($this->isGit) {
|
||||||
|
try {
|
||||||
$repository_api->execxLocal('pull --ff-only');
|
$repository_api->execxLocal('pull --ff-only');
|
||||||
|
} catch (CommandException $ex) {
|
||||||
if (!$this->isGitSvn) {
|
if (!$this->isGitSvn) {
|
||||||
|
throw $ex;
|
||||||
|
}
|
||||||
list($out) = $repository_api->execxLocal(
|
list($out) = $repository_api->execxLocal(
|
||||||
'log %s..%s',
|
'log %s..%s',
|
||||||
$this->ontoRemoteBranch,
|
$this->ontoRemoteBranch,
|
||||||
$this->onto);
|
$this->onto);
|
||||||
if (strlen(trim($out))) {
|
if (strlen(trim($out))) {
|
||||||
$local_ahead_of_remote = true;
|
$local_ahead_of_remote = true;
|
||||||
|
} else {
|
||||||
|
$repository_api->execxLocal('svn rebase');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ($this->isHg) {
|
} else if ($this->isHg) {
|
||||||
// execManual instead of execx because outgoing returns
|
// execManual instead of execx because outgoing returns
|
||||||
// code 1 when there is nothing outgoing
|
// code 1 when there is nothing outgoing
|
||||||
|
|
Loading…
Reference in a new issue