1
0
Fork 0

Allow using fossil dependency in a fossil repository, fixes #7125, closes #7126

pull/6683/merge
Edwin Rodríguez 2018-02-21 00:49:11 -03:00 committed by Jordi Boggiano
parent fa539766b8
commit 9dc6222288
3 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ class FossilDownloader extends VcsDownloader
if (0 !== $this->process->execute($command, $ignoredOutput)) { if (0 !== $this->process->execute($command, $ignoredOutput)) {
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput()); throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
} }
$command = sprintf('fossil open %s', ProcessExecutor::escape($repoFile)); $command = sprintf('fossil open %s --nested', ProcessExecutor::escape($repoFile));
if (0 !== $this->process->execute($command, $ignoredOutput, realpath($path))) { if (0 !== $this->process->execute($command, $ignoredOutput, realpath($path))) {
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput()); throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
} }

View File

@ -96,7 +96,7 @@ class FossilDriver extends VcsDriver
throw new \RuntimeException('Failed to clone '.$this->url.' to repository ' . $this->repoFile . "\n\n" .$output); throw new \RuntimeException('Failed to clone '.$this->url.' to repository ' . $this->repoFile . "\n\n" .$output);
} }
if (0 !== $this->process->execute(sprintf('fossil open %s', ProcessExecutor::escape($this->repoFile)), $output, $this->checkoutDir)) { if (0 !== $this->process->execute(sprintf('fossil open %s --nested', ProcessExecutor::escape($this->repoFile)), $output, $this->checkoutDir)) {
$output = $this->process->getErrorOutput(); $output = $this->process->getErrorOutput();
throw new \RuntimeException('Failed to open repository '.$this->repoFile.' in ' . $this->checkoutDir . "\n\n" .$output); throw new \RuntimeException('Failed to open repository '.$this->repoFile.' in ' . $this->checkoutDir . "\n\n" .$output);

View File

@ -76,7 +76,7 @@ class FossilDownloaderTest extends TestCase
->with($this->equalTo($expectedFossilCommand)) ->with($this->equalTo($expectedFossilCommand))
->will($this->returnValue(0)); ->will($this->returnValue(0));
$expectedFossilCommand = $this->getCmd('fossil open \'repo.fossil\''); $expectedFossilCommand = $this->getCmd('fossil open \'repo.fossil\' --nested');
$processExecutor->expects($this->at(1)) $processExecutor->expects($this->at(1))
->method('execute') ->method('execute')
->with($this->equalTo($expectedFossilCommand)) ->with($this->equalTo($expectedFossilCommand))