mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Expand "local working copy" conditional check in Diffusion
Summary: We don't care about any disk resources at all for non-hosted SVN repositories. See <https://github.com/facebook/phabricator/issues/428>. Test Plan: Looked at a non-hosted SVN repo, saw no storage info. Reviewers: btrahan, chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D7506
This commit is contained in:
parent
71e6386a73
commit
5cc26f065d
1 changed files with 20 additions and 20 deletions
|
@ -726,27 +726,27 @@ final class DiffusionRepositoryEditMainController
|
||||||
->setNote($daemon_instructions));
|
->setNote($daemon_instructions));
|
||||||
}
|
}
|
||||||
|
|
||||||
$local_parent = dirname($repository->getLocalPath());
|
|
||||||
if (Filesystem::pathExists($local_parent)) {
|
|
||||||
$view->addItem(
|
|
||||||
id(new PHUIStatusItemView())
|
|
||||||
->setIcon('accept-green')
|
|
||||||
->setTarget(pht('Storage Directory OK'))
|
|
||||||
->setNote(phutil_tag('tt', array(), $local_parent)));
|
|
||||||
} else {
|
|
||||||
$view->addItem(
|
|
||||||
id(new PHUIStatusItemView())
|
|
||||||
->setIcon('warning-red')
|
|
||||||
->setTarget(pht('No Storage Directory'))
|
|
||||||
->setNote(
|
|
||||||
pht(
|
|
||||||
'Storage directory %s does not exist, or is not readable by '.
|
|
||||||
'the webserver. Create this directory or make it readable.',
|
|
||||||
phutil_tag('tt', array(), $local_parent))));
|
|
||||||
return $view;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($repository->usesLocalWorkingCopy()) {
|
if ($repository->usesLocalWorkingCopy()) {
|
||||||
|
$local_parent = dirname($repository->getLocalPath());
|
||||||
|
if (Filesystem::pathExists($local_parent)) {
|
||||||
|
$view->addItem(
|
||||||
|
id(new PHUIStatusItemView())
|
||||||
|
->setIcon('accept-green')
|
||||||
|
->setTarget(pht('Storage Directory OK'))
|
||||||
|
->setNote(phutil_tag('tt', array(), $local_parent)));
|
||||||
|
} else {
|
||||||
|
$view->addItem(
|
||||||
|
id(new PHUIStatusItemView())
|
||||||
|
->setIcon('warning-red')
|
||||||
|
->setTarget(pht('No Storage Directory'))
|
||||||
|
->setNote(
|
||||||
|
pht(
|
||||||
|
'Storage directory %s does not exist, or is not readable by '.
|
||||||
|
'the webserver. Create this directory or make it readable.',
|
||||||
|
phutil_tag('tt', array(), $local_parent))));
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
$local_path = $repository->getLocalPath();
|
$local_path = $repository->getLocalPath();
|
||||||
$message = idx($messages, PhabricatorRepositoryStatusMessage::TYPE_INIT);
|
$message = idx($messages, PhabricatorRepositoryStatusMessage::TYPE_INIT);
|
||||||
if ($message) {
|
if ($message) {
|
||||||
|
|
Loading…
Reference in a new issue