浏览代码

fixed detection of inactive branches in hg

Christoph 12 年之前
父节点
当前提交
cebd43e735
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Repository/Vcs/HgDriver.php

+ 1 - 1
src/Composer/Repository/Vcs/HgDriver.php

@@ -169,7 +169,7 @@ class HgDriver extends VcsDriver
 
 
             $this->process->execute('hg branches', $output, $this->repoDir);
             $this->process->execute('hg branches', $output, $this->repoDir);
             foreach ($this->process->splitLines($output) as $branch) {
             foreach ($this->process->splitLines($output) as $branch) {
-                if ($branch && preg_match('(^([^\s]+)\s+\d+:(.*)$)', $branch, $match)) {
+                if ($branch && preg_match('(^([^\s]+)\s+\d+:([a-f0-9]+))', $branch, $match)) {
                     $branches[$match[1]] = $match[2];
                     $branches[$match[1]] = $match[2];
                 }
                 }
             }
             }