1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

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:
epriestley 2012-01-24 09:00:39 -08:00
parent 58f4dc0369
commit 51bc18e93f
2 changed files with 6 additions and 7 deletions

View file

@ -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 =
' &middot; '.
'Next step: <tt>'.phutil_escape_html($next_step).'</tt>';
$next_step = ' &middot; Next step: '.$next_step;
}
}
$status =

View file

@ -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');