mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Clarify "Closed" revision status with VCS-specific language
Summary: Instead of rendering "Revision Status: Closed (Sat, Apr 28, 10:28 AM)", render "Revision Status: Closed (Pushed Sat, Apr 28, 10:28 AM)", or "Committed", as appropriate. Test Plan: Looked at a committed revision. Reviewers: btrahan, vrana, jungejason Reviewed By: jungejason CC: jeffmo, rdbayer, aran Maniphest Tasks: T909 Differential Revision: https://secure.phabricator.com/D2334
This commit is contained in:
parent
2909f0b06f
commit
7e9a2dc4d2
1 changed files with 14 additions and 2 deletions
|
@ -33,9 +33,10 @@ final class DifferentialRevisionStatusFieldSpecification
|
|||
|
||||
$status = $revision->getStatus();
|
||||
$info = null;
|
||||
$vcs = $diff->getSourceControlSystem();
|
||||
|
||||
if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) {
|
||||
switch ($diff->getSourceControlSystem()) {
|
||||
switch ($vcs) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
$next_step = '<tt>hg push</tt>';
|
||||
break;
|
||||
|
@ -52,7 +53,18 @@ final class DifferentialRevisionStatusFieldSpecification
|
|||
|
||||
} else if ($status == ArcanistDifferentialRevisionStatus::CLOSED) {
|
||||
$committed = $revision->getDateCommitted();
|
||||
$info = ' ('.phabricator_datetime($committed, $this->getUser()).')';
|
||||
switch ($vcs) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
||||
$verb = 'Pushed';
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
$verb = 'Committed';
|
||||
break;
|
||||
}
|
||||
$when = phabricator_datetime($committed, $this->getUser());
|
||||
|
||||
$info = " ({$verb} {$when})";
|
||||
}
|
||||
|
||||
$status =
|
||||
|
|
Loading…
Reference in a new issue