Fix var scope in HgDriver
parent
d200481037
commit
23ef8a419a
|
@ -31,13 +31,12 @@ class HgDriver extends VcsDriver
|
|||
*/
|
||||
public function initialize()
|
||||
{
|
||||
$this->tmpDir = $this->config->get('home') . '/cache.hg/' . preg_replace('{[^a-z0-9]}i', '-', $url) . '/';
|
||||
$this->tmpDir = $this->config->get('home') . '/cache.hg/' . preg_replace('{[^a-z0-9]}i', '-', $this->url) . '/';
|
||||
|
||||
$url = escapeshellarg($this->url);
|
||||
if (is_dir($this->tmpDir)) {
|
||||
$this->process->execute(sprintf('cd %s && hg pull -u', escapeshellarg($this->tmpDir)), $output);
|
||||
} else {
|
||||
$this->process->execute(sprintf('cd %s && hg clone %s %s', escapeshellarg(dirname($this->tmpDir)), $url, escapeshellarg($this->tmpDir)), $output);
|
||||
$this->process->execute(sprintf('cd %s && hg clone %s %s', escapeshellarg(dirname($this->tmpDir)), escapeshellarg($this->url), escapeshellarg($this->tmpDir)), $output);
|
||||
}
|
||||
|
||||
$this->getTags();
|
||||
|
|
Loading…
Reference in New Issue