Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: hason/composer
...
head fork: hason/composer
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 3 contributors
View
2  doc/05-repositories.md
@@ -92,7 +92,7 @@ The `composer` repository is also what packagist uses. To reference a
`composer` repository, just supply the path before the `packages.json` file.
In case of packagist, that file is located at `/packages.json`, so the URL of
the repository would be `http://packagist.org`. For
-`http://example.org/packages.org` the repository URL would be
+`http://example.org/packages.json` the repository URL would be
`http://example.org`.
### VCS
View
10 src/Composer/Downloader/HgDownloader.php
@@ -29,7 +29,10 @@ public function doDownload(PackageInterface $package, $path)
$ref = escapeshellarg($package->getSourceReference());
$path = escapeshellarg($path);
$this->io->write(" Cloning ".$package->getSourceReference());
- $this->process->execute(sprintf('hg clone %s %s && cd %2$s && hg up %s', $url, $path, $ref), $ignoredOutput);
+ $command = sprintf('hg clone %s %s && cd %2$s && hg up %s', $url, $path, $ref);
+ if (0 !== $this->process->execute($command, $ignoredOutput)) {
+ throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
+ }
}
/**
@@ -41,7 +44,10 @@ public function doUpdate(PackageInterface $initial, PackageInterface $target, $p
$ref = escapeshellarg($target->getSourceReference());
$path = escapeshellarg($path);
$this->io->write(" Updating to ".$target->getSourceReference());
- $this->process->execute(sprintf('cd %s && hg pull %s && hg up %s', $path, $url, $ref), $ignoredOutput);
+ $command = sprintf('cd %s && hg pull %s && hg up %s', $path, $url, $ref);
+ if (0 !== $this->process->execute($command, $ignoredOutput)) {
+ throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
+ }
}
/**
View
6 tests/Composer/Test/Downloader/HgDownloaderTest.php
@@ -52,7 +52,8 @@ public function testDownload()
$processExecutor = $this->getMock('Composer\Util\ProcessExecutor');
$processExecutor->expects($this->once())
->method('execute')
- ->with($this->equalTo($expectedGitCommand));
+ ->with($this->equalTo($expectedGitCommand))
+ ->will($this->returnValue(0));
$downloader = $this->getDownloaderMock(null, $processExecutor);
$downloader->download($packageMock, 'composerPath');
@@ -91,7 +92,8 @@ public function testUpdate()
->with($this->equalTo($expectedResetCommand));
$processExecutor->expects($this->at(1))
->method('execute')
- ->with($this->equalTo($expectedUpdateCommand));
+ ->with($this->equalTo($expectedUpdateCommand))
+ ->will($this->returnValue(0));
$downloader = $this->getDownloaderMock(null, $processExecutor);
$downloader->update($packageMock, $packageMock, 'composerPath');

No commit comments for this range

Something went wrong with that request. Please try again.