class HgDownloader extends VcsDownloader (View source)

Properties

protected IOInterface $io from VcsDownloader
protected Config $config from VcsDownloader
protected ProcessExecutor $process from VcsDownloader
protected Filesystem $filesystem from VcsDownloader

Methods

__construct(IOInterface $io, Config $config, ProcessExecutor $process = null, Filesystem $fs = null)

No description

string
getInstallationSource()

Returns installation source (either source or dist).

download(PackageInterface $package, string $path)

Downloads specific package into specific folder.

update(PackageInterface $initial, PackageInterface $target, string $path)

Updates specific package in specific folder from initial to target version.

remove(PackageInterface $package, string $path)

Removes specific package from specific folder.

setOutputProgress(bool $outputProgress)

Sets whether to output download progress information or not

string|null
getVcsReference(PackageInterface $package, string $path)

Gets the VCS Reference for the package at path

cleanChanges(PackageInterface $package, string $path, bool $update)

Prompt the user to check if changes should be stashed/removed or the operation aborted

reapplyChanges(string $path)

Guarantee that no changes have been made to the local copy

doDownload(PackageInterface $package, string $path, string $url)

Downloads specific package into specific folder.

doUpdate(PackageInterface $initial, PackageInterface $target, string $path, string $url)

Updates specific package in specific folder from initial to target version.

string
getCommitLogs(string $fromReference, string $toReference, string $path)

Fetches the commit logs between two commits

bool
hasMetadataRepository(string $path)

Checks if VCS metadata repository has been initialized repository example: .git|.svn|.hg

string|null
getLocalChanges(PackageInterface $package, string $path)

Checks for changes to the local copy

Details

__construct(IOInterface $io, Config $config, ProcessExecutor $process = null, Filesystem $fs = null)

Parameters

IOInterface $io
Config $config
ProcessExecutor $process
Filesystem $fs

string getInstallationSource()

Returns installation source (either source or dist).

Return Value

string "source" or "dist"

download(PackageInterface $package, string $path)

Downloads specific package into specific folder.

Parameters

PackageInterface $package package instance
string $path download path

update(PackageInterface $initial, PackageInterface $target, string $path)

Updates specific package in specific folder from initial to target version.

Parameters

PackageInterface $initial initial package
PackageInterface $target updated package
string $path download path

remove(PackageInterface $package, string $path)

Removes specific package from specific folder.

Parameters

PackageInterface $package package instance
string $path download path

DownloaderInterface setOutputProgress(bool $outputProgress)

Sets whether to output download progress information or not

Parameters

bool $outputProgress

Return Value

DownloaderInterface

string|null getVcsReference(PackageInterface $package, string $path)

Gets the VCS Reference for the package at path

Parameters

PackageInterface $package package directory
string $path package directory

Return Value

string|null reference or null

protected cleanChanges(PackageInterface $package, string $path, bool $update)

Prompt the user to check if changes should be stashed/removed or the operation aborted

Parameters

PackageInterface $package
string $path
bool $update if true (update) the changes can be stashed and reapplied after an update, if false (remove) the changes should be assumed to be lost if the operation is not aborted

Exceptions

RuntimeException in case the operation must be aborted

protected reapplyChanges(string $path)

Guarantee that no changes have been made to the local copy

Parameters

string $path

Exceptions

RuntimeException in case the operation must be aborted or the patch does not apply cleanly

doDownload(PackageInterface $package, string $path, string $url)

Downloads specific package into specific folder.

Parameters

PackageInterface $package package instance
string $path download path
string $url package url

doUpdate(PackageInterface $initial, PackageInterface $target, string $path, string $url)

Updates specific package in specific folder from initial to target version.

Parameters

PackageInterface $initial initial package
PackageInterface $target updated package
string $path download path
string $url package url

protected string getCommitLogs(string $fromReference, string $toReference, string $path)

Fetches the commit logs between two commits

Parameters

string $fromReference the source reference
string $toReference the target reference
string $path the package path

Return Value

string

protected bool hasMetadataRepository(string $path)

Checks if VCS metadata repository has been initialized repository example: .git|.svn|.hg

Parameters

string $path

Return Value

bool

string|null getLocalChanges(PackageInterface $package, string $path)

Checks for changes to the local copy

Parameters

PackageInterface $package package instance
string $path package directory

Return Value

string|null changes or null