@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Detect missing 'svn', 'hg' and 'git' during setup

Summary:
These are a bit tricky because we don't want to require you to install a VCS you don't use just to use Phabricator. Test that repositories exist before performing the checks.

I'll couple this with additional checks during repository creation.

Test Plan: Changed binary names to nonexistent ones, verified setup issues raised properly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6040

+34
+34
src/applications/config/check/PhabricatorSetupCheckBinaries.php
··· 60 60 "differing files, but did not.")); 61 61 } 62 62 } 63 + 64 + $table = new PhabricatorRepository(); 65 + $vcses = queryfx_all( 66 + $table->establishConnection('r'), 67 + 'SELECT DISTINCT versionControlSystem FROM %T', 68 + $table->getTableName()); 69 + 70 + foreach ($vcses as $vcs) { 71 + switch ($vcs['versionControlSystem']) { 72 + case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: 73 + $binary = 'git'; 74 + break; 75 + case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: 76 + $binary = 'svn'; 77 + break; 78 + case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: 79 + $binary = 'hg'; 80 + break; 81 + default: 82 + $binary = null; 83 + break; 84 + } 85 + if (!$binary) { 86 + continue; 87 + } 88 + 89 + if (!Filesystem::binaryExists($binary)) { 90 + $message = pht( 91 + 'You have at least one repository configured which uses this '. 92 + 'version control system. It will not work without the VCS binary.'); 93 + $this->raiseWarning($binary, $message); 94 + } 95 + } 96 + 63 97 } 64 98 65 99 private function raiseWarning($bin, $message) {