1
0
Fork 0

Stop hg from parsing project's repository information while installing dependencies from source (HgDownloader) or initializing a VcsRepository (HgDriver).

pull/150/head
Per Bernhardt 2011-12-12 14:06:22 +01:00
parent d78548cbf9
commit 2fc49aa88b
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ class HgDownloader implements DownloaderInterface
$url = escapeshellarg($package->getSourceUrl()); $url = escapeshellarg($package->getSourceUrl());
$ref = escapeshellarg($package->getSourceReference()); $ref = escapeshellarg($package->getSourceReference());
system(sprintf('hg clone %s %s && cd %2$s && hg up %s', $url, $path, $ref)); system(sprintf('(hg clone %s %s 2> /dev/null) && cd %2$s && hg up %s', $url, $path, $ref));
} }
/** /**

View File

@ -41,7 +41,7 @@ class HgDriver implements VcsDriverInterface
if (is_dir($this->tmpDir)) { if (is_dir($this->tmpDir)) {
exec(sprintf('cd %s && hg pull -u', $tmpDir), $output); exec(sprintf('cd %s && hg pull -u', $tmpDir), $output);
} else { } else {
exec(sprintf('hg clone %s %s', $url, $tmpDir), $output); exec(sprintf('cd %s && hg clone %s %s', escapeshellarg(sys_get_temp_dir()), $url, $tmpDir), $output);
} }
$this->getTags(); $this->getTags();
@ -179,7 +179,7 @@ class HgDriver implements VcsDriverInterface
return false; return false;
} }
exec(sprintf('hg identify %s', escapeshellarg($url)), $ignored, $exit); exec(sprintf('cd %s && hg identify %s', escapeshellarg(sys_get_temp_dir()), escapeshellarg($url)), $ignored, $exit);
return $exit === 0; return $exit === 0;
} }
} }