Differential D25031 Diff 83 src/applications/config/controller/PhabricatorConfigConsoleController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/controller/PhabricatorConfigConsoleController.php
Context not available. | |||||
$rows = array(); | $rows = array(); | ||||
foreach ($versions as $name => $info) { | foreach ($versions as $name => $info) { | ||||
$branchpoint = $info['branchpoint']; | $branchpoint = $info['branchpoint']; | ||||
if (strlen($branchpoint)) { | if (@strlen($branchpoint)) { | ||||
$branchpoint = substr($branchpoint, 0, 12); | $branchpoint = @substr($branchpoint, 0, 12); | ||||
} else { | } else { | ||||
$branchpoint = null; | $branchpoint = null; | ||||
} | } | ||||
$version = $info['hash']; | $version = $info['hash']; | ||||
if (strlen($version)) { | if (@strlen($version)) { | ||||
$version = substr($version, 0, 12); | $version = @substr($version, 0, 12); | ||||
} else { | } else { | ||||
$version = pht('Unknown'); | $version = pht('Unknown'); | ||||
} | } | ||||
Context not available. | |||||
foreach ($remotes as $remote) { | foreach ($remotes as $remote) { | ||||
$remote_pattern = '/^([^\t]+)\t([^ ]+) \(([^)]+)\)\z/'; | $remote_pattern = '/^([^\t]+)\t([^ ]+) \(([^)]+)\)\z/'; | ||||
$matches = null; | $matches = null; | ||||
if (!preg_match($remote_pattern, $remote, $matches)) { | if (!@preg_match($remote_pattern, $remote, $matches)) { | ||||
continue; | continue; | ||||
} | } | ||||
Context not available. | |||||
} | } | ||||
$uri = $matches[2]; | $uri = $matches[2]; | ||||
$is_upstream = preg_match($upstream_pattern, $uri); | $is_upstream = @preg_match($upstream_pattern, $uri); | ||||
if (!$is_upstream) { | if (!$is_upstream) { | ||||
continue; | continue; | ||||
} | } | ||||
Context not available. | |||||
foreach ($log_futures as $lib => $future) { | foreach ($log_futures as $lib => $future) { | ||||
list($err, $stdout) = $future->resolve(); | list($err, $stdout) = $future->resolve(); | ||||
if (!$err) { | if (!$err) { | ||||
list($hash, $epoch) = explode(' ', $stdout); | list($hash, $epoch) = @explode(' ', $stdout); | ||||
} else { | } else { | ||||
$hash = null; | $hash = null; | ||||
$epoch = null; | $epoch = null; | ||||
Context not available. | |||||
list($err, $stdout) = $upstream_future->resolve(); | list($err, $stdout) = $upstream_future->resolve(); | ||||
if (!$err) { | if (!$err) { | ||||
$branchpoint = trim($stdout); | $branchpoint = trim($stdout); | ||||
if (strlen($branchpoint)) { | if (@strlen($branchpoint)) { | ||||
// We only list a branchpoint if it differs from HEAD. | // We only list a branchpoint if it differs from HEAD. | ||||
if ($branchpoint != $hash) { | if ($branchpoint != $hash) { | ||||
$result['upstream'] = $lib_upstreams[$lib]; | $result['upstream'] = $lib_upstreams[$lib]; | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0