瀏覽代碼

Fixes for SVN support, fixes #172

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

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

@@ -71,6 +71,7 @@ class SvnDriver extends VcsDriver implements VcsDriverInterface
      */
     public function getComposerInformation($identifier)
     {
+        $identifier = '/' . trim($identifier, '/') . '/';
         if (!isset($this->infoCache[$identifier])) {
             preg_match('{^(.+?)(@\d+)?$}', $identifier, $match);
             if (!empty($match[2])) {
@@ -141,7 +142,7 @@ class SvnDriver extends VcsDriver implements VcsDriverInterface
             unset($output);
 
             $this->process->execute(sprintf('svn ls --verbose --non-interactive %s', escapeshellarg($this->baseUrl.'/branches')), $output);
-            foreach ($this->process->splitLines($output) as $line) {
+            foreach ($this->process->splitLines(trim($output)) as $line) {
                 preg_match('{^\s*(\S+).*?(\S+)\s*$}', $line, $match);
                 if ($match[2] === './') {
                     continue;