Fixed variable used before being instanciated in the Mercurial backend.

This commit is contained in:
Loic d'Anterroches 2009-07-23 23:33:08 +02:00
parent 021805f1e1
commit 6845f59150

View File

@ -261,9 +261,10 @@ class IDF_Scm_Mercurial extends IDF_Scm
return $this->cache['branches']; return $this->cache['branches'];
} }
$out = array(); $out = array();
$cmd = sprintf(Pluf::f('hg_path', 'hg').' branches -R %s',
escapeshellarg($this->repo));
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd; $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
exec(sprintf(Pluf::f('hg_path', 'hg').' branches -R %s', exec($cmd, $out);
escapeshellarg($this->repo)), $out);
$res = array(); $res = array();
foreach ($out as $b) { foreach ($out as $b) {
preg_match('/(\S+).*\S+:(\S+)/', $b, $match); preg_match('/(\S+).*\S+:(\S+)/', $b, $match);