From 773338a688ed54b28d963703c4860398d4eff9c8 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 24 Feb 2012 10:17:59 +0100 Subject: [PATCH] Fixes for SVN support, fixes #172 --- src/Composer/Repository/Vcs/SvnDriver.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Composer/Repository/Vcs/SvnDriver.php b/src/Composer/Repository/Vcs/SvnDriver.php index 46b8d3a38..8404b7cc2 100644 --- a/src/Composer/Repository/Vcs/SvnDriver.php +++ b/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;