瀏覽代碼

Fix parsing of trunk in SvnDriver, fixes composer/satis#88

Jordi Boggiano 12 年之前
父節點
當前提交
2bf90b544a
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/Composer/Repository/Vcs/SvnDriver.php

+ 7 - 1
src/Composer/Repository/Vcs/SvnDriver.php

@@ -193,7 +193,13 @@ class SvnDriver extends VcsDriver
         if (null === $this->branches) {
             $this->branches = array();
 
-            $output = $this->execute('svn ls --verbose', $this->baseUrl . '/');
+            if (false === strpos($this->trunkPath, '/')) {
+                $trunkParent = $this->baseUrl . '/';
+            } else {
+                $trunkParent = $this->baseUrl . '/' . dirname($this->trunkPath) . '/';
+            }
+
+            $output = $this->execute('svn ls --verbose', $trunkParent);
             if ($output) {
                 foreach ($this->process->splitLines($output) as $line) {
                     $line = trim($line);