diff --git a/src/applications/differential/field/specification/revisionstatus/DifferentialRevisionStatusFieldSpecification.php b/src/applications/differential/field/specification/revisionstatus/DifferentialRevisionStatusFieldSpecification.php index 3a24cddaee..5fae5f7f0d 100644 --- a/src/applications/differential/field/specification/revisionstatus/DifferentialRevisionStatusFieldSpecification.php +++ b/src/applications/differential/field/specification/revisionstatus/DifferentialRevisionStatusFieldSpecification.php @@ -33,19 +33,24 @@ final class DifferentialRevisionStatusFieldSpecification $status = $revision->getStatus(); $info = null; - $vcs = $diff->getSourceControlSystem(); + $local_vcs = $diff->getSourceControlSystem(); + $backing_vcs = $diff->getBackingVersionControlSystem(); if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) { - switch ($vcs) { - case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: - $next_step = 'hg push'; - break; - case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: - $next_step = 'arc land'; - break; - case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: - $next_step = 'arc commit'; - break; + if ($local_vcs == $backing_vcs) { + switch ($local_vcs) { + case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: + $next_step = 'hg push'; + break; + case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: + $next_step = 'arc land'; + break; + case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: + $next_step = 'arc commit'; + break; + } + } else { + $next_step = 'arc amend'; } if ($next_step) { $info = ' · Next step: '.$next_step; @@ -53,7 +58,7 @@ final class DifferentialRevisionStatusFieldSpecification } else if ($status == ArcanistDifferentialRevisionStatus::CLOSED) { $committed = $revision->getDateCommitted(); - switch ($vcs) { + switch ($backing_vcs) { case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: $verb = 'Pushed'; diff --git a/src/applications/differential/storage/diff/DifferentialDiff.php b/src/applications/differential/storage/diff/DifferentialDiff.php index 33d14538ed..b0e576b01b 100644 --- a/src/applications/differential/storage/diff/DifferentialDiff.php +++ b/src/applications/differential/storage/diff/DifferentialDiff.php @@ -85,6 +85,11 @@ final class DifferentialDiff extends DifferentialDAO { $this->getArcanistProjectPHID()); } + public function getBackingVersionControlSystem() { + $repository = $this->loadArcanistProject()->loadRepository(); + return $repository->getVersionControlSystem(); + } + public function save() { // TODO: sort out transactions // $this->openTransaction();