Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepository.php
Show First 20 Lines • Show All 1,869 Lines • ▼ Show 20 Lines | public function loadUpdateInterval($minimum = 15) { | ||||
$smart_wait = min($smart_wait, $longest_wait); | $smart_wait = min($smart_wait, $longest_wait); | ||||
$smart_wait = max($minimum, $smart_wait); | $smart_wait = max($minimum, $smart_wait); | ||||
return (int)$smart_wait; | return (int)$smart_wait; | ||||
} | } | ||||
/** | /** | ||||
* Retrieve the sevice URI for the device hosting this repository. | * Retrieve the service URI for the device hosting this repository. | ||||
* | * | ||||
* See @{method:newConduitClient} for a general discussion of interacting | * See @{method:newConduitClient} for a general discussion of interacting | ||||
* with repository services. This method provides lower-level resolution of | * with repository services. This method provides lower-level resolution of | ||||
* services, returning raw URIs. | * services, returning raw URIs. | ||||
* | * | ||||
* @param PhabricatorUser Viewing user. | * @param PhabricatorUser Viewing user. | ||||
* @param bool `true` to throw if a remote URI would be returned. | * @param bool `true` to throw if a remote URI would be returned. | ||||
* @param list<string> List of allowable protocols. | * @param list<string> List of allowable protocols. | ||||
▲ Show 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | /* -( Repository URI Management )------------------------------------------ */ | ||||
} | } | ||||
public function getPassthroughEnvironmentalVariables() { | public function getPassthroughEnvironmentalVariables() { | ||||
$env = $_ENV; | $env = $_ENV; | ||||
if ($this->isGit()) { | if ($this->isGit()) { | ||||
// $_ENV does not populate in CLI contexts if "E" is missing from | // $_ENV does not populate in CLI contexts if "E" is missing from | ||||
// "variables_order" in PHP config. Currently, we do not require this | // "variables_order" in PHP config. Currently, we do not require this | ||||
// to be configured. Since it may not be, explictitly bring expected Git | // to be configured. Since it may not be, explicitly bring expected Git | ||||
// environmental variables into scope. This list is not exhaustive, but | // environmental variables into scope. This list is not exhaustive, but | ||||
// only lists variables with a known impact on commit hook behavior. | // only lists variables with a known impact on commit hook behavior. | ||||
// This can be removed if we later require "E" in "variables_order". | // This can be removed if we later require "E" in "variables_order". | ||||
$git_env = array( | $git_env = array( | ||||
'GIT_OBJECT_DIRECTORY', | 'GIT_OBJECT_DIRECTORY', | ||||
'GIT_ALTERNATE_OBJECT_DIRECTORIES', | 'GIT_ALTERNATE_OBJECT_DIRECTORIES', | ||||
▲ Show 20 Lines • Show All 505 Lines • Show Last 20 Lines |