1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Suggest branch name in Next Step

Summary: Is this correct for Mercurial?

Test Plan: Saw it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4957
This commit is contained in:
vrana 2013-02-14 11:58:20 -08:00
parent 9a3d0f71a3
commit 63f35ee94f
2 changed files with 15 additions and 4 deletions

View file

@ -228,7 +228,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
$revision_detail = new DifferentialRevisionDetailView();
$revision_detail->setRevision($revision);
$revision_detail->setDiff(reset($diffs));
$revision_detail->setDiff(end($diffs));
$revision_detail->setAuxiliaryFields($aux_fields);
$actions = $this->getRevisionActions($revision);

View file

@ -69,13 +69,24 @@ final class DifferentialRevisionDetailView extends AphrontView {
if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) {
switch ($local_vcs) {
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
$next_step = phutil_tag('tt', array(), 'arc land');
$bookmark = $this->getDiff()->getBookmark();
$command = ($bookmark != ''
? csprintf('arc land %s', $bookmark)
: 'arc land');
break;
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
$branch = $this->getDiff()->getBranch();
$command = ($branch != ''
? csprintf('arc land %s', $branch)
: 'arc land');
break;
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
$next_step = phutil_tag('tt', array(), 'arc commit');
$command = 'arc commit';
break;
}
$next_step = phutil_tag('tt', array(), $command);
}
if ($next_step) {
$properties->addProperty(pht('Next Step'), $next_step);