Page MenuHomePhorge
Diviner Tech Docs DiffusionMercurialRequest

final class DiffusionMercurialRequest
Phorge Technical Documentation (Diffusion)

This class is not documented.

Tasks

Creating Requests

  • final public static function newFromDictionary($data) — Create a new synthetic request from a parameter dictionary. If you need a @{class:DiffusionRequest} object in order to issue a DiffusionQuery, you can use this method to build one.
  • private function __construct() — Internal.
  • private static function newFromIdentifier($identifier, $viewer, $need_edit) — Internal. Use @{method:newFromDictionary}, not this method.
  • private static function newFromRepository($repository) — Internal. Use @{method:newFromDictionary}, not this method.
  • private function initializeFromDictionary($data) — Internal. Use @{method:newFromDictionary}, not this method.

Managing Diffusion URIs

  • public static function parseRequestBlob($blob, $supports_branches) — Internal. Public only for unit tests.

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.

final public function supportsBranches()
Inherited

This method is not documented.
Return
wild

protected function isStableCommit($symbol)

This method is not documented.
Parameters
$symbol
Return
wild

protected function didInitialize()
Inherited

This method is not documented.
Return
wild

final public static function newFromDictionary($data)
Inherited

DiffusionRequest

Create a new synthetic request from a parameter dictionary. If you need a DiffusionRequest object in order to issue a DiffusionQuery, you can use this method to build one.

Parameters are:

  • repository Repository object or identifier.
  • user Viewing user. Required if repository is an identifier.
  • branch Optional, branch name.
  • path Optional, file path.
  • commit Optional, commit identifier.
  • line Optional, line range.
Parameters
map$dataSee documentation.
Return
DiffusionRequestNew request object.

private function __construct()
Inherited

DiffusionRequest

Internal.

Return
this//Implicit.//

private static function newFromIdentifier($identifier, $viewer, $need_edit)
Inherited

DiffusionRequest

Internal. Use newFromDictionary(), not this method.

Parameters
string$identifierRepository identifier.
PhabricatorUser$viewerViewing user.
$need_edit
Return
DiffusionRequestNew request object.

private static function newFromRepository($repository)
Inherited

DiffusionRequest

Internal. Use newFromDictionary(), not this method.

Parameters
PhabricatorRepository$repositoryRepository object.
Return
DiffusionRequestNew request object.

private function initializeFromDictionary($data)
Inherited

DiffusionRequest

Internal. Use newFromDictionary(), not this method.

Parameters
map$dataMap of parsed data.
Return
void

final public function setUser($user)
Inherited

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

final public function getUser()
Inherited

This method is not documented.
Return
wild

public function getRepository()
Inherited

This method is not documented.
Return
wild

public function setPath($path)
Inherited

This method is not documented.
Parameters
$path
Return
wild

public function getPath()
Inherited

This method is not documented.
Return
wild

public function getLine()
Inherited

This method is not documented.
Return
wild

public function getCommit()
Inherited

This method is not documented.
Return
wild

public function getSymbolicCommit()
Inherited

DiffusionRequest

Get the symbolic commit associated with this request.

A symbolic commit may be a commit hash, an abbreviated commit hash, a branch name, a tag name, or an expression like "HEAD^^^". The symbolic commit may also be absent.

This method always returns the symbol present in the original request, in unmodified form.

See also getStableCommit().

Return
string|nullSymbolic commit, if one was present in the request.

public function updateSymbolicCommit($symbol)
Inherited

DiffusionRequest

Modify the request to move the symbolic commit elsewhere.

Parameters
string$symbolNew symbolic commit.
Return
this

public function getSymbolicType()
Inherited

DiffusionRequest

Get the ref type (commit or tag) of the location associated with this request.

If a symbolic commit is present in the request, this method identifies the type of the symbol. Otherwise, it identifies the type of symbol of the location the request is implicitly associated with. This will probably always be commit.

Return
stringSymbolic commit type (`commit` or `tag`).

public function getStableCommit()
Inherited

DiffusionRequest

Retrieve the stable, permanent commit name identifying the repository location associated with this request.

This returns a non-symbolic identifier for the current commit: in Git and Mercurial, a 40-character SHA1; in SVN, a revision number.

See also getSymbolicCommit().

Return
stringStable commit name, like a git hash or SVN revision. Not a symbolic commit reference.

public function getBranch()

This method is not documented.
Return
wild

public function getLint()
Inherited

This method is not documented.
Return
wild

protected function getArcanistBranch()
Inherited

This method is not documented.
Return
wild

public function loadBranch()
Inherited

This method is not documented.
Return
wild

public function loadCoverage()
Inherited

This method is not documented.
Return
wild

public function loadCommit()
Inherited

This method is not documented.
Return
wild

public function loadCommitData()
Inherited

This method is not documented.
Return
wild

public function generateURI($params)
Inherited

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

public static function parseRequestBlob($blob, $supports_branches)
Inherited

DiffusionRequest

Internal. Public only for unit tests.

Parse the request URI into components.

Parameters
string$blobURI blob.
bool$supports_branchesTrue if this VCS supports branches.
Return
mapParsed URI.

protected function validateWorkingCopy($path)
Inherited

DiffusionRequest

Check that the working copy of the repository is present and readable.

Parameters
string$pathPath to the working copy.
Return
wild

protected function raisePermissionException()
Inherited

This method is not documented.
Return
wild

protected function raiseCloneException()
Inherited

This method is not documented.
Return
wild

private function queryStableCommit()
Inherited

This method is not documented.
Return
wild

public function getRefAlternatives()
Inherited

This method is not documented.
Return
wild

private function chooseBestRefMatch($ref, $results)
Inherited

This method is not documented.
Parameters
$ref
array$results
Return
wild

public function resolveRefs($refs, $types)
Inherited

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

public function setIsClusterRequest($is_cluster_request)
Inherited

This method is not documented.
Parameters
$is_cluster_request
Return
wild

public function getIsClusterRequest()
Inherited

This method is not documented.
Return
wild