Improve "next steps" text in Differential
Summary: - Even for immutable-history Git workflows, we suggest "arc amend". Instead, suggest "arc amend" or "arc merge" (ideally we'd know which, but we can't currently get that information). - We suggest "arc amend --revision X", but this is less safe and less simple than "arc amend", especially after D1480. - For Mercurial, suggest "arc merge". Test Plan: Looked at some "Accepted" revisions. Reviewers: btrahan, jungejason CC: aran, epriestley Maniphest Tasks: T662 Differential Revision: https://secure.phabricator.com/D1481
This commit is contained in:
@@ -35,17 +35,18 @@ final class DifferentialRevisionStatusFieldSpecification
|
||||
$next_step = null;
|
||||
if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) {
|
||||
switch ($diff->getSourceControlSystem()) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
$next_step = '<tt>arc merge</tt>';
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
||||
$next_step = 'arc amend --revision '.$revision->getID();
|
||||
$next_step = '<tt>arc amend</tt> or <tt>arc merge</tt>';
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
$next_step = 'arc commit --revision '.$revision->getID();
|
||||
$next_step = '<tt>arc commit</tt>';
|
||||
break;
|
||||
}
|
||||
if ($next_step) {
|
||||
$next_step =
|
||||
' · '.
|
||||
'Next step: <tt>'.phutil_escape_html($next_step).'</tt>';
|
||||
$next_step = ' · Next step: '.$next_step;
|
||||
}
|
||||
}
|
||||
$status =
|
||||
|
||||
@@ -11,7 +11,5 @@ phutil_require_module('arcanist', 'differential/constants/revisionstatus');
|
||||
phutil_require_module('phabricator', 'applications/differential/field/specification/base');
|
||||
phutil_require_module('phabricator', 'applications/repository/constants/repositorytype');
|
||||
|
||||
phutil_require_module('phutil', 'markup');
|
||||
|
||||
|
||||
phutil_require_source('DifferentialRevisionStatusFieldSpecification.php');
|
||||
|
||||
Reference in New Issue
Block a user