Differential D25047 Diff 261 src/applications/config/controller/PhabricatorConfigConsoleController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/controller/PhabricatorConfigConsoleController.php
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | public function newLibraryVersionTable() { | ||||
return id(new PHUIObjectBoxView()) | return id(new PHUIObjectBoxView()) | ||||
->setHeaderText(pht('Version Information')) | ->setHeaderText(pht('Version Information')) | ||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ||||
->appendChild($table_view); | ->appendChild($table_view); | ||||
} | } | ||||
private function loadVersions(PhabricatorUser $viewer) { | private function loadVersions(PhabricatorUser $viewer) { | ||||
$specs = array( | $specs = array( | ||||
'phabricator', | 'phorge', | ||||
'arcanist', | 'arcanist', | ||||
); | ); | ||||
$all_libraries = PhutilBootloader::getInstance()->getAllLibraries(); | $all_libraries = PhutilBootloader::getInstance()->getAllLibraries(); | ||||
// This puts the core libraries at the top: | // This puts the core libraries at the top: | ||||
$other_libraries = array_diff($all_libraries, $specs); | $other_libraries = array_diff($all_libraries, $specs); | ||||
$specs = array_merge($specs, $other_libraries); | $specs = array_merge($specs, $other_libraries); | ||||
Show All 17 Lines | foreach ($specs as $lib) { | ||||
->setCWD($root); | ->setCWD($root); | ||||
} | } | ||||
$all_futures = array_merge($log_futures, $remote_futures); | $all_futures = array_merge($log_futures, $remote_futures); | ||||
id(new FutureIterator($all_futures)) | id(new FutureIterator($all_futures)) | ||||
->resolveAll(); | ->resolveAll(); | ||||
// A repository may have a bunch of remotes, but we're only going to look | // A repository may have a bunch of remotes, but we're only going to look | ||||
// for remotes we host to try to figure out where this repository branched. | // for remotes we host to try to figure out where this repository branched. | ||||
$upstream_pattern = '(github\.com/phacility/|secure\.phabricator\.com/)'; | $upstream_pattern = | ||||
'('. | |||||
implode('|', array( | |||||
'we\.phorge\.it/', | |||||
'github\.com/phacility/', | |||||
'secure\.phabricator\.com/', | |||||
)). | |||||
')'; | |||||
speck: For a future change/discussion - it might make sense to have this be configurable. We run a… | |||||
$upstream_futures = array(); | $upstream_futures = array(); | ||||
$lib_upstreams = array(); | $lib_upstreams = array(); | ||||
foreach ($specs as $lib) { | foreach ($specs as $lib) { | ||||
$remote_future = $remote_futures[$lib]; | $remote_future = $remote_futures[$lib]; | ||||
list($err, $stdout) = $remote_future->resolve(); | list($err, $stdout) = $remote_future->resolve(); | ||||
if ($err) { | if ($err) { | ||||
// If this fails for whatever reason, just move on. | // If this fails for whatever reason, just move on. | ||||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |
For a future change/discussion - it might make sense to have this be configurable. We run a forked version of phab/arcanist (without this bit modified~) and it's bitten us when setting up or updating. Since our install clones from an internal repo we have to make sure a specific remote exists in the repository even though it's not used.