Page MenuHomePhorge
Diviner Tech Docs PhabricatorRepositoryPullEngine

final class PhabricatorRepositoryPullEngine
Phorge Technical Documentation (Repositories)

Manages execution of git pull and hg pull commands for PhabricatorRepository objects. Used by PhabricatorRepositoryPullLocalDaemon.

This class also covers initial working copy setup through git clone, git init, hg clone, hg init, or svnadmin create.

Tasks

Configuring Repository Engines

Internals

  • protected function log($pattern)

Pulling Working Copies

No methods for this task.

Pulling Git Working Copies

Pulling Mercurial Working Copies

Pulling Subversion Working Copies

Other Methods

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

public function setRepository($repository)
Inherited

This method is not documented.
Parameters
PhabricatorRepository$repository
Return
wild

protected function getRepository()
Inherited

This method is not documented.
Return
wild

public function setVerbose($verbose)
Inherited

This method is not documented.
Parameters
$verbose
Return
wild

public function getVerbose()
Inherited

This method is not documented.
Return
wild

public function getViewer()
Inherited

This method is not documented.
Return
wild

protected function newRepositoryLock($repository, $lock_key, $lock_device_only)
Inherited

This method is not documented.
Parameters
PhabricatorRepository$repository
$lock_key
$lock_device_only
Return
wild

protected function log($pattern)
Inherited

This method is not documented.
Parameters
$pattern
Return
wild

final protected function queueCommitImportTask($repository, $commit_phid, $task_priority, $via)
Inherited

This method is not documented.
Parameters
PhabricatorRepository$repository
$commit_phid
$task_priority
$via
Return
wild

final protected function getImportTaskPriority($repository, $refs)
Inherited

This method is not documented.
Parameters
PhabricatorRepository$repository
array$refs
Return
wild

public function pullRepository()

This method is not documented.
Return
wild

private function pullRepositoryWithLock()

This method is not documented.
Return
wild

private function skipPull($message)

This method is not documented.
Parameters
$message
Return
wild

private function abortPull($message, $ex)

This method is not documented.
Parameters
$message
Exception$ex
Return
wild

private function logPull($message)

This method is not documented.
Parameters
$message
Return
wild

private function donePull()

This method is not documented.
Return
wild

private function updateRepositoryInitStatus($code, $message)

This method is not documented.
Parameters
$code
$message
Return
wild

private function installHook($path, $hook_argv)

This method is not documented.
Parameters
$path
array$hook_argv
Return
wild

private function installHookDirectory($path)

This method is not documented.
Parameters
$path
Return
wild

private function getHookContextIdentifier($repository)

This method is not documented.
Parameters
PhabricatorRepository$repository
Return
wild

private function executeGitCreate()

This method is not documented.
Return
wild

private function executeGitUpdate()

This method is not documented.
Return
wild

private function getGitRefRules($repository)

This method is not documented.
Parameters
PhabricatorRepository$repository
Return
wild

private function getGitFetchRules($repository)

This method is not documented.
Parameters
PhabricatorRepository$repository
Return
wild

private function installGitHook()

This method is not documented.
Return
wild
This method is not documented.
Return
wild

private function loadGitRemoteRefs($repository, $remote_envelope, $is_local)

This method is not documented.
Parameters
PhabricatorRepository$repository
PhutilOpaqueEnvelope$remote_envelope
$is_local
Return
wild

private function loadGitLocalRefs($repository)

This method is not documented.
Parameters
PhabricatorRepository$repository
Return
wild

private function logRefDifferences($remote, $local)

This method is not documented.
Parameters
array$remote
array$local
Return
wild

private function executeMercurialCreate()

This method is not documented.
Return
wild

private function executeMercurialUpdate()

This method is not documented.
Return
wild

private function censorMercurialErrorMessage($message)

Censor response bodies from Mercurial error messages.

When Mercurial attempts to clone an HTTP repository but does not receive a response it expects, it emits the response body in the command output.

This represents a potential SSRF issue, because an attacker with permission to create repositories can create one which points at the remote URI for some local service, then read the response from the error message. To prevent this, censor response bodies out of error messages.

Parameters
string$messageUncensored Mercurial command output.
Return
stringCensored Mercurial command output.

private function installMercurialHook()

This method is not documented.
Return
wild

private function executeSubversionCreate()

This method is not documented.
Return
wild

private function installSubversionHook()

This method is not documented.
Return
wild