Page MenuHomenazrin ltd
Diviner Tech Docs PhabricatorRepository

final class PhabricatorRepository
Phorge Technical Documentation (Repositories)

This class is not documented.

Tasks

Repository URI Management

  • public function getRemoteURI() — Get the remote URI for this repository.
  • public function getRemoteURIEnvelope() — Get the remote URI for this repository, including credentials if they're used by this repository.
  • public function getPublicCloneURI() — Get the clone (or checkout) URI for this repository, without authentication information.
  • public function getRemoteProtocol() — Get the protocol for the repository's remote.
  • public function getRemoteURIObject() — Get a parsed object representation of the repository's remote URI..
  • private function shouldUseSSH() — Determine if we should connect to the remote using SSH flags and credentials.
  • private function shouldUseHTTP() — Determine if we should connect to the remote using HTTP flags and credentials.
  • private function shouldUseSVNProtocol() — Determine if we should connect to the remote using SVN flags and credentials.
  • private function isSSHProtocol($protocol) — Determine if a protocol is SSH or SSH-like.

Publishing

No methods for this task.

Cluster Synchronization

No methods for this task.

Other Methods

Methods

public function getApplicationName()
Inherited

This method is not documented.
Return
wild

public static function initializeNewRepository($actor)

This method is not documented.
Parameters
PhabricatorUser$actor
Return
wild

protected function getConfiguration()

This method is not documented.
Return
wild

public function generatePHID()

This method is not documented.
Return
wild

public static function getStatusMap()

This method is not documented.
Return
wild

public static function getStatusNameMap()

This method is not documented.
Return
wild

public function getStatus()

This method is not documented.
Return
wild

public function toDictionary()

This method is not documented.
Return
wild

public function getDefaultTextEncoding()

This method is not documented.
Return
wild

public function getMonogram()

This method is not documented.
Return
wild

public function getDisplayName()

This method is not documented.
Return
wild

public function getAllMonograms()

This method is not documented.
Return
wild

public function setLocalPath($path)

This method is not documented.
Parameters
$path
Return
wild

public function getDetail($key, $default)

This method is not documented.
Parameters
$key
$default
Return
wild

public function setDetail($key, $value)

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

public function attachCommitCount($count)

This method is not documented.
Parameters
$count
Return
wild

public function getCommitCount()

This method is not documented.
Return
wild

public function attachMostRecentCommit($commit)

This method is not documented.
Parameters
PhabricatorRepositoryCommit$commit
Return
wild

public function getMostRecentCommit()

This method is not documented.
Return
wild

public function getDiffusionBrowseURIForPath($user, $path, $line, $branch)

This method is not documented.
Parameters
PhabricatorUser$user
$path
$line
$branch
Return
wild

public function getSubversionBaseURI($commit)

This method is not documented.
Parameters
$commit
Return
wild

public function getSubversionPathURI($path, $commit)

This method is not documented.
Parameters
$path
$commit
Return
wild

public function attachProjectPHIDs($project_phids)

This method is not documented.
Parameters
array$project_phids
Return
wild

public function getProjectPHIDs()

This method is not documented.
Return
wild

public function getCloneName()

Get the name of the directory this repository should clone or checkout into. For example, if the repository name is "Example Repository", a reasonable name might be "example-repository". This is used to help users get reasonable results when cloning repositories, since they generally do not want to clone into directories called "X/" or "Example Repository/".

Return
string

public static function isValidRepositorySlug($slug)

This method is not documented.
Parameters
$slug
Return
wild

public static function assertValidRepositorySlug($slug)

This method is not documented.
Parameters
$slug
Return
wild

public static function assertValidCallsign($callsign)

This method is not documented.
Parameters
$callsign
Return
wild

public function getProfileImageURI()

This method is not documented.
Return
wild

public function attachProfileImageFile($file)

This method is not documented.
Parameters
PhabricatorFile$file
Return
wild

public function getProfileImageFile()

This method is not documented.
Return
wild

public function execRemoteCommand($pattern)

This method is not documented.
Parameters
$pattern
Return
wild

public function execxRemoteCommand($pattern)

This method is not documented.
Parameters
$pattern
Return
wild

public function getRemoteCommandFuture($pattern)

This method is not documented.
Parameters
$pattern
Return
wild

public function passthruRemoteCommand($pattern)

This method is not documented.
Parameters
$pattern
Return
wild

private function newRemoteCommandFuture($argv)

This method is not documented.
Parameters
array$argv
Return
wild

private function newRemoteCommandPassthru($argv)

This method is not documented.
Parameters
array$argv
Return
wild

private function newRemoteCommandEngine($argv)

This method is not documented.
Parameters
array$argv
Return
wild

public function execLocalCommand($pattern)

This method is not documented.
Parameters
$pattern
Return
wild

public function execxLocalCommand($pattern)

This method is not documented.
Parameters
$pattern
Return
wild

public function getLocalCommandFuture($pattern)

This method is not documented.
Parameters
$pattern
Return
wild

public function passthruLocalCommand($pattern)

This method is not documented.
Parameters
$pattern
Return
wild

private function newLocalCommandFuture($argv)

This method is not documented.
Parameters
array$argv
Return
wild

private function newLocalCommandPassthru($argv)

This method is not documented.
Parameters
array$argv
Return
wild

public function getURI()

This method is not documented.
Return
wild

public function getPathURI($path)

This method is not documented.
Parameters
$path
Return
wild

public function getCommitURI($identifier)

This method is not documented.
Parameters
$identifier
Return
wild

public static function parseRepositoryServicePath($request_path, $vcs)

This method is not documented.
Parameters
$request_path
$vcs
Return
wild

public function getCanonicalPath($request_path)

This method is not documented.
Parameters
$request_path
Return
wild

public function generateURI($params)

This method is not documented.
Parameters
array$params
Return
wild

public function updateURIIndex()

This method is not documented.
Return
wild

public function isTracked()

This method is not documented.
Return
wild

public function getDefaultBranch()

This method is not documented.
Return
wild

public function getDefaultArcanistBranch()

This method is not documented.
Return
wild

private function isBranchInFilter($branch, $filter_key)

This method is not documented.
Parameters
$branch
$filter_key
Return
wild

public static function extractBranchRegexp($pattern)

This method is not documented.
Parameters
$pattern
Return
wild

public function shouldTrackRef($ref)

This method is not documented.
Parameters
DiffusionRepositoryRef$ref
Return
wild

public function shouldTrackBranch($branch)

This method is not documented.
Parameters
$branch
Return
wild

public function isBranchPermanentRef($branch)

This method is not documented.
Parameters
$branch
Return
wild

public function formatCommitName($commit_identifier, $local)

This method is not documented.
Parameters
$commit_identifier
$local
Return
wild

public function isImporting()

This method is not documented.
Return
wild

public function isNewlyInitialized()

This method is not documented.
Return
wild

public function loadImportProgress()

This method is not documented.
Return
wild

public function newPublisher()

This method is not documented.
Return
wild

public function isPublishingDisabled()

This method is not documented.
Return
wild

public function getPermanentRefRules()

This method is not documented.
Return
wild

public function setPermanentRefRules($rules)

This method is not documented.
Parameters
array$rules
Return
wild

public function getTrackOnlyRules()

This method is not documented.
Return
wild

public function setTrackOnlyRules($rules)

This method is not documented.
Parameters
array$rules
Return
wild

public function supportsFetchRules()

This method is not documented.
Return
wild

public function getFetchRules()

This method is not documented.
Return
wild

public function setFetchRules($rules)

This method is not documented.
Parameters
array$rules
Return
wild

public function getRemoteURI()

Get the remote URI for this repository.

Return
string

public function getRemoteURIEnvelope()

Get the remote URI for this repository, including credentials if they're used by this repository.

Return
PhutilOpaqueEnvelopeURI, possibly including credentials.

public function getPublicCloneURI()

Get the clone (or checkout) URI for this repository, without authentication information.

Return
stringRepository URI.

public function getRemoteProtocol()

Get the protocol for the repository's remote.

Return
stringProtocol, like "ssh" or "git".

public function getRemoteURIObject()

Get a parsed object representation of the repository's remote URI..

Return
wildA @{class@arcanist:PhutilURI}.

public function getCloneURIObject()

Get the "best" clone/checkout URI for this repository, on any protocol.

Return
wild

private function getRawHTTPCloneURIObject()

This method is not documented.
Return
wild

private function shouldUseSSH()

Determine if we should connect to the remote using SSH flags and credentials.

Return
boolTrue to use the SSH protocol.

private function shouldUseHTTP()

Determine if we should connect to the remote using HTTP flags and credentials.

Return
boolTrue to use the HTTP protocol.

private function shouldUseSVNProtocol()

Determine if we should connect to the remote using SVN flags and credentials.

Return
boolTrue to use the SVN protocol.

private function isSSHProtocol($protocol)

Determine if a protocol is SSH or SSH-like.

Parameters
string$protocolA protocol string, like "http" or "ssh".
Return
boolTrue if the protocol is SSH-like.

public function delete()

This method is not documented.
Return
wild

public function isGit()

This method is not documented.
Return
wild

public function isSVN()

This method is not documented.
Return
wild

public function isHg()

This method is not documented.
Return
wild

public function isHosted()

This method is not documented.
Return
wild

public function setHosted($enabled)

This method is not documented.
Parameters
$enabled
Return
wild

public function canServeProtocol($protocol, $write, $is_intracluster)

This method is not documented.
Parameters
$protocol
$write
$is_intracluster
Return
wild

public function hasLocalWorkingCopy()

This method is not documented.
Return
wild

private function assertLocalExists()

Raise more useful errors when there are basic filesystem problems.

Return
wild

public function isWorkingCopyBare()

Determine if the working copy is bare or not. In Git, this corresponds to --bare. In Mercurial, --noupdate.

Return
wild

public function usesLocalWorkingCopy()

This method is not documented.
Return
wild

public function getHookDirectories()

This method is not documented.
Return
wild

public function canDestroyWorkingCopy()

This method is not documented.
Return
wild

public function canUsePathTree()

This method is not documented.
Return
wild

public function canUseGitLFS()

This method is not documented.
Return
wild

public function getGitLFSURI($path)

This method is not documented.
Parameters
$path
Return
wild

public function canMirror()

This method is not documented.
Return
wild

public function canAllowDangerousChanges()

This method is not documented.
Return
wild

public function shouldAllowDangerousChanges()

This method is not documented.
Return
wild

public function canAllowEnormousChanges()

This method is not documented.
Return
wild

public function shouldAllowEnormousChanges()

This method is not documented.
Return
wild

public function writeStatusMessage($status_type, $status_code, $parameters)

This method is not documented.
Parameters
$status_type
$status_code
array$parameters
Return
wild

public static function assertValidRemoteURI($uri)

This method is not documented.
Parameters
$uri
Return
wild

public function loadUpdateInterval($minimum)

Load the pull frequency for this repository, based on the time since the last activity.

We pull rarely used repositories less frequently. This finds the most recent commit which is older than the current time (which prevents us from spinning on repositories with a silly commit post-dated to some time in 2037). We adjust the pull frequency based on when the most recent commit occurred.

Parameters
int$minimumThe minimum update interval to use, in seconds.
Return
intRepository update interval, in seconds.

public function getCopyTimeLimit()

Time limit for cloning or copying this repository.

This limit is used to timeout operations like git clone or git fetch when doing intracluster synchronization, building working copies, etc.

Return
intMaximum number of seconds to spend copying this repository.

public function setCopyTimeLimit($limit)

This method is not documented.
Parameters
$limit
Return
wild

public function getDefaultCopyTimeLimit()

This method is not documented.
Return
wild

public function getEffectiveCopyTimeLimit()

This method is not documented.
Return
wild

public function getFilesizeLimit()

This method is not documented.
Return
wild

public function setFilesizeLimit($limit)

This method is not documented.
Parameters
$limit
Return
wild

public function getTouchLimit()

This method is not documented.
Return
wild

public function setTouchLimit($limit)

This method is not documented.
Parameters
$limit
Return
wild

public function getAlmanacServiceURI($viewer, $options)

Retrieve the service URI for the device hosting this repository.

See newConduitClient() for a general discussion of interacting with repository services. This method provides lower-level resolution of services, returning raw URIs.

Parameters
PhabricatorUser$viewerViewing user.
map<string,$optionswild> Constraints on selectable services.
Return
string|nullURI, or `null` for local repositories.

public function getAlmanacServiceRefs($viewer, $options)

This method is not documented.
Parameters
PhabricatorUser$viewer
array$options
Return
wild

private function sortReadableAlmanacServiceRefs($refs)

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

private function sortWritableAlmanacServiceRefs($refs)

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

public function supportsSynchronization()

This method is not documented.
Return
wild

public function supportsRefs()

This method is not documented.
Return
wild

public function getAlmanacServiceCacheKey()

This method is not documented.
Return
wild

private function buildAlmanacServiceURIs()

This method is not documented.
Return
wild

public function newConduitClient($viewer, $never_proxy)

Build a new Conduit client in order to make a service call to this repository.

If the repository is hosted locally, this method may return null. The caller should use ConduitCall or other local logic to complete the request.

By default, we will return a ConduitClient for any repository with a service, even if that service is on the current device.

We do this because this configuration does not make very much sense in a production context, but is very common in a test/development context (where the developer's machine is both the web host and the repository service). By proxying in development, we get more consistent behavior between development and production, and don't have a major untested codepath.

The $never_proxy parameter can be used to prevent this local proxying. If the flag is passed:

  • The method will return null (implying a local service call) if the repository service is hosted on the current device.
  • The method will throw if it would need to return a client.

This is used to prevent loops in Conduit: the first request will proxy, even in development, but the second request will be identified as a cluster request and forced not to proxy.

For lower-level service resolution, see getAlmanacServiceURI().

Parameters
PhabricatorUser$viewerViewing user.
bool$never_proxy`true` to throw if a client would be returned.
Return
ConduitClient|nullClient, or `null` for local repositories.

public function newConduitClientForRequest($request)

This method is not documented.
Parameters
ConduitAPIRequest$request
Return
wild

public function newConduitFuture($viewer, $method, $params, $never_proxy)

This method is not documented.
Parameters
PhabricatorUser$viewer
$method
array$params
$never_proxy
Return
wild
This method is not documented.
Return
wild

public function supportsBranchComparison()

This method is not documented.
Return
wild

public function isReadOnly()

This method is not documented.
Return
wild

public function setReadOnly($read_only)

This method is not documented.
Parameters
$read_only
Return
wild

public function getReadOnlyMessage()

This method is not documented.
Return
wild

public function setReadOnlyMessage($message)

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

public function attachURIs($uris)

This method is not documented.
Parameters
array$uris
Return
wild

public function getURIs()

This method is not documented.
Return
wild

public function getCloneURIs()

This method is not documented.
Return
wild

public function newBuiltinURIs()

This method is not documented.
Return
wild

public function getClusterRepositoryURIFromBinding($binding)

This method is not documented.
Parameters
AlmanacBinding$binding
Return
wild

public function loadAlmanacService()

This method is not documented.
Return
wild

public function markImporting()

This method is not documented.
Return
wild

public function getSymbolSources()

This method is not documented.
Return
wild

public function getSymbolLanguages()

This method is not documented.
Return
wild

public function supportsStaging()

This method is not documented.
Return
wild

public function getStagingURI()

This method is not documented.
Return
wild

public function supportsAutomation()

This method is not documented.
Return
wild

public function canPerformAutomation()

This method is not documented.
Return
wild

public function getAutomationBlueprintPHIDs()

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

public function getCapabilities()

This method is not documented.
Return
wild

public function getPolicy($capability)

This method is not documented.
Parameters
$capability
Return
wild

public function hasAutomaticCapability($capability, $user)

This method is not documented.
Parameters
$capability
PhabricatorUser$user
Return
wild

public function getMarkupFieldKey($field)

This method is not documented.
Parameters
$field
Return
wild

public function newMarkupEngine($field)

This method is not documented.
Parameters
$field
Return
wild

public function getMarkupText($field)

This method is not documented.
Parameters
$field
Return
wild

public function didMarkupText($field, $output, $engine)

This method is not documented.
Parameters
$field
$output
PhutilMarkupEngine$engine
Return
wild

public function shouldUseMarkupCache($field)

This method is not documented.
Parameters
$field
Return
wild

public function destroyObjectPermanently($engine)

This method is not documented.
Parameters
PhabricatorDestructionEngine$engine
Return
wild

public function newDestructibleCodex()

This method is not documented.
Return
wild

public function getSpacePHID()

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

public function getFieldValuesForConduit()

This method is not documented.
Return
wild

private function getStringListForConduit($list)

This method is not documented.
Parameters
$list
Return
wild

public function getConduitSearchAttachments()

This method is not documented.
Return
wild

public function newFulltextEngine()

This method is not documented.
Return
wild

public function newFerretEngine()

This method is not documented.
Return
wild