mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
Avoid fatal error if there's no Arcanist project or repository
Test Plan: Display diff without repository Reviewers: nh, epriestley Reviewed By: epriestley CC: aran, Koolvin Differential Revision: https://secure.phabricator.com/D2373
This commit is contained in:
parent
fd3d510dc8
commit
ec068ff453
2 changed files with 6 additions and 0 deletions
|
@ -35,6 +35,9 @@ final class DifferentialRevisionStatusFieldSpecification
|
|||
$info = null;
|
||||
$local_vcs = $diff->getSourceControlSystem();
|
||||
$backing_vcs = $diff->getBackingVersionControlSystem();
|
||||
if (!$backing_vcs) {
|
||||
$backing_vcs = $local_vcs;
|
||||
}
|
||||
|
||||
if ($status == ArcanistDifferentialRevisionStatus::ACCEPTED) {
|
||||
if ($local_vcs == $backing_vcs) {
|
||||
|
|
|
@ -91,6 +91,9 @@ final class DifferentialDiff extends DifferentialDAO {
|
|||
return null;
|
||||
}
|
||||
$repository = $arcanist_project->loadRepository();
|
||||
if (!$repository) {
|
||||
return null;
|
||||
}
|
||||
return $repository->getVersionControlSystem();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue