Fixed notices for edge cases.
parent
2fc49aa88b
commit
399a406018
|
@ -121,11 +121,14 @@ class HgDriver implements VcsDriverInterface
|
||||||
public function getTags()
|
public function getTags()
|
||||||
{
|
{
|
||||||
if (null === $this->tags) {
|
if (null === $this->tags) {
|
||||||
|
$tags = array();
|
||||||
|
|
||||||
exec(sprintf('cd %s && hg tags --color never', escapeshellarg($this->tmpDir)), $output);
|
exec(sprintf('cd %s && hg tags --color never', escapeshellarg($this->tmpDir)), $output);
|
||||||
foreach ($output as $tag) {
|
foreach ($output as $tag) {
|
||||||
preg_match('(^([^\s]+)[\s]+[\d+]:(.*)$)', $tag, $match);
|
if (preg_match('(^([^\s]+)\s+\d+:(.*)$)', $tag, $match))
|
||||||
$tags[$match[1]] = $match[2];
|
$tags[$match[1]] = $match[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tags = $tags;
|
$this->tags = $tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +145,7 @@ class HgDriver implements VcsDriverInterface
|
||||||
|
|
||||||
exec(sprintf('cd %s && hg branches --color never', escapeshellarg($this->tmpDir)), $output);
|
exec(sprintf('cd %s && hg branches --color never', escapeshellarg($this->tmpDir)), $output);
|
||||||
foreach ($output as $branch) {
|
foreach ($output as $branch) {
|
||||||
preg_match('(^([^\s]+)[\s]+[\d+]:(.*)$)', $branch, $match);
|
if (preg_match('(^([^\s]+)\s+\d+:(.*)$)', $branch, $match))
|
||||||
$branches[$match[1]] = $match[2];
|
$branches[$match[1]] = $match[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue