Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13988848
D7439.id16806.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D7439.id16806.diff
View Options
Index: src/__phutil_library_map__.php
===================================================================
--- src/__phutil_library_map__.php
+++ src/__phutil_library_map__.php
@@ -1740,6 +1740,7 @@
'PhabricatorSetupCheckPHPConfig' => 'applications/config/check/PhabricatorSetupCheckPHPConfig.php',
'PhabricatorSetupCheckPath' => 'applications/config/check/PhabricatorSetupCheckPath.php',
'PhabricatorSetupCheckPygment' => 'applications/config/check/PhabricatorSetupCheckPygment.php',
+ 'PhabricatorSetupCheckRepositories' => 'applications/config/check/PhabricatorSetupCheckRepositories.php',
'PhabricatorSetupCheckStorage' => 'applications/config/check/PhabricatorSetupCheckStorage.php',
'PhabricatorSetupCheckTimezone' => 'applications/config/check/PhabricatorSetupCheckTimezone.php',
'PhabricatorSetupIssue' => 'applications/config/issue/PhabricatorSetupIssue.php',
@@ -4070,6 +4071,7 @@
'PhabricatorSetupCheckPHPConfig' => 'PhabricatorSetupCheck',
'PhabricatorSetupCheckPath' => 'PhabricatorSetupCheck',
'PhabricatorSetupCheckPygment' => 'PhabricatorSetupCheck',
+ 'PhabricatorSetupCheckRepositories' => 'PhabricatorSetupCheck',
'PhabricatorSetupCheckStorage' => 'PhabricatorSetupCheck',
'PhabricatorSetupCheckTimezone' => 'PhabricatorSetupCheck',
'PhabricatorSetupIssueExample' => 'PhabricatorUIExample',
Index: src/applications/config/check/PhabricatorSetupCheckRepositories.php
===================================================================
--- /dev/null
+++ src/applications/config/check/PhabricatorSetupCheckRepositories.php
@@ -0,0 +1,43 @@
+<?php
+
+final class PhabricatorSetupCheckRepositories extends PhabricatorSetupCheck {
+
+ protected function executeChecks() {
+ $repo_path = PhabricatorEnv::getEnvConfig('repository.default-local-path');
+
+ if (!$repo_path) {
+ $summary = pht(
+ "The configuration option '%s' is not set.",
+ 'repository.default-local-path');
+ $this->newIssue('repository.default-local-path.empty')
+ ->setName(pht('Missing Repository Local Path'))
+ ->setSummary($summary)
+ ->addPhabricatorConfig('repository.default-local-path');
+ return;
+ }
+
+ if (!Filesystem::pathExists($repo_path)) {
+ $summary = pht(
+ "The path for local repositories does not exist, or is not ".
+ "readable by the webserver.");
+ $message = pht(
+ "The directory for local repositories (%s) does not exist, or is not ".
+ "readable by the webserver. Phabricator uses this directory to store ".
+ "information about repositories. If this directory does not exist, ".
+ "create it:\n\n".
+ "%s\n".
+ "If this directory exists, make it readable to the webserver. You ".
+ "can also edit the configuration below to use some other directory.",
+ phutil_tag('tt', array(), $repo_path),
+ phutil_tag('pre', array(), csprintf('$ mkdir -p %s', $repo_path)));
+
+ $this->newIssue('repository.default-local-path.empty')
+ ->setName(pht('Missing Repository Local Path'))
+ ->setSummary($summary)
+ ->setMessage($message)
+ ->addPhabricatorConfig('repository.default-local-path');
+ }
+
+ }
+
+}
Index: src/applications/repository/PhabricatorRepositoryConfigOptions.php
===================================================================
--- src/applications/repository/PhabricatorRepositoryConfigOptions.php
+++ src/applications/repository/PhabricatorRepositoryConfigOptions.php
@@ -21,15 +21,10 @@
pht("Default location to store local copies of repositories."))
->setDescription(
pht(
- "The default location in which to store local copies of ".
- "repositories. Anything stored in this directory will be assumed ".
- "to be under the control of Phabricator, which means that ".
- "Phabricator will try to do some maintenance on working copies ".
- "if there are problems (such as a change to the remote origin ".
- "url). This maintenance may include completely removing (and ".
- "recloning) anything in this directory.\n\n".
- "When set to null, this option is ignored (i.e. Phabricator will ".
- "not fully control any working copies).")),
+ "The default location in which to store working copies and other ".
+ "data about repositories. Phabricator will control and manage ".
+ "data here, so you should **not** choose an existing directory ".
+ "full of data you care about.")),
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 22, 4:19 PM (3 w, 11 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6742284
Default Alt Text
D7439.id16806.diff (4 KB)
Attached To
Mode
D7439: Raise a setup warning for missing or invalid local repository directory
Attached
Detach File
Event Timeline
Log In to Comment