mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 23:02:41 +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;
|
||||
if ($this->isGit) {
|
||||
try {
|
||||
$repository_api->execxLocal('pull --ff-only');
|
||||
|
||||
} catch (CommandException $ex) {
|
||||
if (!$this->isGitSvn) {
|
||||
throw $ex;
|
||||
}
|
||||
list($out) = $repository_api->execxLocal(
|
||||
'log %s..%s',
|
||||
$this->ontoRemoteBranch,
|
||||
$this->onto);
|
||||
if (strlen(trim($out))) {
|
||||
$local_ahead_of_remote = true;
|
||||
} else {
|
||||
$repository_api->execxLocal('svn rebase');
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($this->isHg) {
|
||||
// execManual instead of execx because outgoing returns
|
||||
// code 1 when there is nothing outgoing
|
||||
|
|
Loading…
Reference in a new issue