Changeset View
Changeset View
Standalone View
Standalone View
scripts/repository/commit_hook.php
| Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | if (strlen($remote_address)) { | ||||
| $engine->setRemoteAddress($remote_address); | $engine->setRemoteAddress($remote_address); | ||||
| } | } | ||||
| $remote_protocol = getenv(DiffusionCommitHookEngine::ENV_REMOTE_PROTOCOL); | $remote_protocol = getenv(DiffusionCommitHookEngine::ENV_REMOTE_PROTOCOL); | ||||
| if (strlen($remote_protocol)) { | if (strlen($remote_protocol)) { | ||||
| $engine->setRemoteProtocol($remote_protocol); | $engine->setRemoteProtocol($remote_protocol); | ||||
| } | } | ||||
| $request_identifier = getenv(DiffusionCommitHookEngine::ENV_REQUEST); | |||||
| if (strlen($request_identifier)) { | |||||
| $engine->setRequestIdentifier($request_identifier); | |||||
| } | |||||
| try { | try { | ||||
| $err = $engine->execute(); | $err = $engine->execute(); | ||||
| } catch (DiffusionCommitHookRejectException $ex) { | } catch (DiffusionCommitHookRejectException $ex) { | ||||
| $console = PhutilConsole::getConsole(); | $console = PhutilConsole::getConsole(); | ||||
| if (PhabricatorEnv::getEnvConfig('phabricator.serious-business')) { | if (PhabricatorEnv::getEnvConfig('phabricator.serious-business')) { | ||||
| $preamble = pht('*** PUSH REJECTED BY COMMIT HOOK ***'); | $preamble = pht('*** PUSH REJECTED BY COMMIT HOOK ***'); | ||||
| } else { | } else { | ||||
| Show All 32 Lines | |||||