GIF89; GIF89; %PDF- %PDF-
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Downloader;
use Composer\Package\PackageInterface;
use Composer\Pcre\Preg;
use Composer\Util\ProcessExecutor;
/**
* @author BohwaZ <http://bohwaz.net/>
*/
class FossilDownloader extends VcsDownloader
{
/**
* @inheritDoc
*/
protected function doDownload(PackageInterface $package, $path, $url, PackageInterface $prevPackage = null)
{
return \React\Promise\resolve();
}
/**
* @inheritDoc
*/
protected function doInstall(PackageInterface $package, $path, $url)
{
// Ensure we are allowed to use this URL by config
$this->config->prohibitUrlByConfig($url, $this->io);
$url = ProcessExecutor::escape($url);
$ref = ProcessExecutor::escape($package->getSourceReference());
$repoFile = $path . '.fossil';
$this->io->writeError("Cloning ".$package->getSourceReference());
$command = sprintf('fossil clone -- %s %s', $url, ProcessExecutor::escape($repoFile));
if (0 !== $this->process->execute($command, $ignoredOutput)) {
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
}
$command = sprintf('fossil open --nested -- %s', ProcessExecutor::escape($repoFile));
if (0 !== $this->process->execute($command, $ignoredOutput, realpath($path))) {
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
}
$command = sprintf('fossil update -- %s', $ref);
if (0 !== $this->process->execute($command, $ignoredOutput, realpath($path))) {
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
}
return \React\Promise\resolve();
}
/**
* @inheritDoc
*/
protected function doUpdate(PackageInterface $initial, PackageInterface $target, $path, $url)
{
// Ensure we are allowed to use this URL by config
$this->config->prohibitUrlByConfig($url, $this->io);
$ref = ProcessExecutor::escape($target->getSourceReference());
$this->io->writeError(" Updating to ".$target->getSourceReference());
if (!$this->hasMetadataRepository($path)) {
throw new \RuntimeException('The .fslckout file is missing from '.$path.', see https://getcomposer.org/commit-deps for more information');
}
$command = sprintf('fossil pull && fossil up %s', $ref);
if (0 !== $this->process->execute($command, $ignoredOutput, realpath($path))) {
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
}
return \React\Promise\resolve();
}
/**
* @inheritDoc
*/
public function getLocalChanges(PackageInterface $package, $path)
{
if (!$this->hasMetadataRepository($path)) {
return null;
}
$this->process->execute('fossil changes', $output, realpath($path));
return trim($output) ?: null;
}
/**
* @inheritDoc
*/
protected function getCommitLogs($fromReference, $toReference, $path)
{
$command = sprintf('fossil timeline -t ci -W 0 -n 0 before %s', ProcessExecutor::escape($toReference));
if (0 !== $this->process->execute($command, $output, realpath($path))) {
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
}
$log = '';
$match = '/\d\d:\d\d:\d\d\s+\[' . $toReference . '\]/';
foreach ($this->process->splitLines($output) as $line) {
if (Preg::isMatch($match, $line)) {
break;
}
$log .= $line;
}
return $log;
}
/**
* @inheritDoc
*/
protected function hasMetadataRepository($path)
{
return is_file($path . '/.fslckout') || is_file($path . '/_FOSSIL_');
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| ArchiveDownloader.php | File | 8.43 KB | 0644 |
|
| ChangeReportInterface.php | File | 766 B | 0644 |
|
| DownloadManager.php | File | 15.59 KB | 0644 |
|
| DownloaderInterface.php | File | 3.88 KB | 0644 |
|
| DvcsDownloaderInterface.php | File | 782 B | 0644 |
|
| FileDownloader.php | File | 19.12 KB | 0644 |
|
| FilesystemException.php | File | 803 B | 0644 |
|
| FossilDownloader.php | File | 4.18 KB | 0644 |
|
| GitDownloader.php | File | 24.75 KB | 0644 |
|
| GzipDownloader.php | File | 2.12 KB | 0644 |
|
| HgDownloader.php | File | 3.38 KB | 0644 |
|
| MaxFileSizeExceededException.php | File | 367 B | 0644 |
|
| PathDownloader.php | File | 11.95 KB | 0644 |
|
| PerforceDownloader.php | File | 3.3 KB | 0644 |
|
| PharDownloader.php | File | 1.02 KB | 0644 |
|
| RarDownloader.php | File | 2.41 KB | 0644 |
|
| SvnDownloader.php | File | 8.63 KB | 0644 |
|
| TarDownloader.php | File | 804 B | 0644 |
|
| TransportException.php | File | 1.79 KB | 0644 |
|
| VcsCapableDownloaderInterface.php | File | 795 B | 0644 |
|
| VcsDownloader.php | File | 12.57 KB | 0644 |
|
| XzDownloader.php | File | 1 KB | 0644 |
|
| ZipDownloader.php | File | 11.01 KB | 0644 |
|