Differential D13224 Diff 32492 src/applications/differential/view/DifferentialRevisionDetailView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/view/DifferentialRevisionDetailView.php
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | $properties = id(new PHUIPropertyListView()) | ||||
->setObject($revision); | ->setObject($revision); | ||||
$status = $revision->getStatus(); | $status = $revision->getStatus(); | ||||
$local_vcs = $this->getDiff()->getSourceControlSystem(); | $local_vcs = $this->getDiff()->getSourceControlSystem(); | ||||
$next_step = null; | $next_step = null; | ||||
if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) { | if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) { | ||||
switch ($local_vcs) { | switch ($local_vcs) { | ||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: | case DiffusionRepositoryType::REPOSITORY_TYPE_MERCURIAL: | ||||
$bookmark = $this->getDiff()->getBookmark(); | $bookmark = $this->getDiff()->getBookmark(); | ||||
$next_step = ($bookmark != '' | $next_step = ($bookmark != '' | ||||
? csprintf('arc land %s', $bookmark) | ? csprintf('arc land %s', $bookmark) | ||||
: 'arc land'); | : 'arc land'); | ||||
break; | break; | ||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: | case DiffusionRepositoryType::REPOSITORY_TYPE_GIT: | ||||
$branch = $this->getDiff()->getBranch(); | $branch = $this->getDiff()->getBranch(); | ||||
$next_step = ($branch != '' | $next_step = ($branch != '' | ||||
? csprintf('arc land %s', $branch) | ? csprintf('arc land %s', $branch) | ||||
: 'arc land'); | : 'arc land'); | ||||
break; | break; | ||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: | case DiffusionRepositoryType::REPOSITORY_TYPE_SVN: | ||||
$next_step = 'arc commit'; | $next_step = 'arc commit'; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if ($next_step) { | if ($next_step) { | ||||
$next_step = phutil_tag('tt', array(), $next_step); | $next_step = phutil_tag('tt', array(), $next_step); | ||||
$properties->addProperty(pht('Next Step'), $next_step); | $properties->addProperty(pht('Next Step'), $next_step); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |