diff --git a/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php b/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php index fd4e76de8f..99662a9980 100644 --- a/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/revisionview/DifferentialRevisionViewController.php @@ -267,8 +267,24 @@ class DifferentialRevisionViewController extends DifferentialController { $properties = array(); $status = $revision->getStatus(); + $next_step = null; + if ($status == DifferentialRevisionStatus::ACCEPTED) { + switch ($diff->getSourceControlSystem()) { + case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: + $next_step = 'arc amend --revision '.$revision->getID(); + break; + case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: + $next_step = 'arc commit --revision '.$revision->getID(); + break; + } + if ($next_step) { + $next_step = + ' · '. + 'Next step: '.phutil_escape_html($next_step).''; + } + } $status = DifferentialRevisionStatus::getNameForRevisionStatus($status); - $properties['Revision Status'] = ''.$status.''; + $properties['Revision Status'] = ''.$status.''.$next_step; $author = $handles[$revision->getAuthorPHID()]; $properties['Author'] = $author->renderLink(); @@ -399,6 +415,11 @@ class DifferentialRevisionViewController extends DifferentialController { $properties['Commits'] = implode('
', $links); } + $properties['Apply Patch'] = + 'arc patch D'.$revision->getID().''; + $properties['Export Patch'] = + 'arc export --revision '.$revision->getID().''; + return $properties; } diff --git a/src/applications/differential/controller/revisionview/__init__.php b/src/applications/differential/controller/revisionview/__init__.php index 90c9a5be5d..dac3a7fe73 100644 --- a/src/applications/differential/controller/revisionview/__init__.php +++ b/src/applications/differential/controller/revisionview/__init__.php @@ -26,6 +26,7 @@ phutil_require_module('phabricator', 'applications/differential/view/revisionupd phutil_require_module('phabricator', 'applications/draft/storage/draft'); phutil_require_module('phabricator', 'applications/phid/constants'); phutil_require_module('phabricator', 'applications/phid/handle/data'); +phutil_require_module('phabricator', 'applications/repository/constants/repositorytype'); phutil_require_module('phabricator', 'infrastructure/celerity/api'); phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phabricator', 'view/form/error');