From 9c3201f6d739c6fe2b0e57c7799683e1c04b0186 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 5 Dec 2012 16:55:26 +0100 Subject: [PATCH] Fix commit logs display with svn --- src/Composer/Downloader/SvnDownloader.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Composer/Downloader/SvnDownloader.php b/src/Composer/Downloader/SvnDownloader.php index 82f2bd336..48f6da741 100644 --- a/src/Composer/Downloader/SvnDownloader.php +++ b/src/Composer/Downloader/SvnDownloader.php @@ -138,7 +138,11 @@ class SvnDownloader extends VcsDownloader */ protected function getCommitLogs($fromReference, $toReference, $path) { - $command = sprintf('cd %s && svn log -r%s:%s --incremental', escapeshellarg($path), $fromReference, $toReference); + // strip paths from references and only keep the actual revision + $fromRevision = preg_replace('{.*@(\d+)$}', '$1', $fromReference); + $toRevision = preg_replace('{.*@(\d+)$}', '$1', $toReference); + + $command = sprintf('cd %s && svn log -r%s:%s --incremental', escapeshellarg($path), $fromRevision, $toRevision); if (0 !== $this->process->execute($command, $output)) { throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());