mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Fix warnings for undefined $next_step and $verb
Summary: Revisions don't necessarily have a backing repository, as in "--raw". Test Plan: Looked at a "--raw" revision in accepted and closed states. Reviewers: nh, btrahan Reviewed By: nh CC: aran Differential Revision: https://secure.phabricator.com/D2444
This commit is contained in:
parent
5a1d89227b
commit
4921f3f13b
1 changed files with 16 additions and 12 deletions
|
@ -40,6 +40,7 @@ final class DifferentialRevisionStatusFieldSpecification
|
|||
}
|
||||
|
||||
if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) {
|
||||
$next_step = null;
|
||||
if ($local_vcs == $backing_vcs) {
|
||||
switch ($local_vcs) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
|
@ -58,21 +59,24 @@ final class DifferentialRevisionStatusFieldSpecification
|
|||
if ($next_step) {
|
||||
$info = ' · Next step: '.$next_step;
|
||||
}
|
||||
|
||||
} else if ($status == ArcanistDifferentialRevisionStatus::CLOSED) {
|
||||
$committed = $revision->getDateCommitted();
|
||||
switch ($backing_vcs) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
||||
$verb = 'Pushed';
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
$verb = 'Committed';
|
||||
break;
|
||||
if ($committed) {
|
||||
$verb = null;
|
||||
switch ($backing_vcs) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
||||
$verb = 'Pushed';
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
$verb = 'Committed';
|
||||
break;
|
||||
}
|
||||
if ($verb) {
|
||||
$when = phabricator_datetime($committed, $this->getUser());
|
||||
$info = " ({$verb} {$when})";
|
||||
}
|
||||
}
|
||||
$when = phabricator_datetime($committed, $this->getUser());
|
||||
|
||||
$info = " ({$verb} {$when})";
|
||||
}
|
||||
|
||||
$status =
|
||||
|
|
Loading…
Reference in a new issue