From 16489dc08435ff9f51bb403084e35fa4dffb03be Mon Sep 17 00:00:00 2001 From: Sebastian Brandt Date: Wed, 19 Mar 2014 17:00:30 +0100 Subject: [PATCH 1/2] Update SvnDownloader.php added --ignore-ancestry to the switch statement because it can be a problem with svn:properties --- src/Composer/Downloader/SvnDownloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Downloader/SvnDownloader.php b/src/Composer/Downloader/SvnDownloader.php index 8094a00dd..c31c3df6b 100644 --- a/src/Composer/Downloader/SvnDownloader.php +++ b/src/Composer/Downloader/SvnDownloader.php @@ -48,7 +48,7 @@ class SvnDownloader extends VcsDownloader } $this->io->write(" Checking out " . $ref); - $this->execute($url, "svn switch", sprintf("%s/%s", $url, $ref), $path); + $this->execute($url, "svn switch --ignore-ancestry", sprintf("%s/%s", $url, $ref), $path); } /** From f633ab503ed95b3be0ccc08f533c9eff23a511da Mon Sep 17 00:00:00 2001 From: Sebastian Brandt Date: Fri, 28 Mar 2014 16:27:00 +0100 Subject: [PATCH 2/2] Update SvnDownloader.php --- src/Composer/Downloader/SvnDownloader.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Composer/Downloader/SvnDownloader.php b/src/Composer/Downloader/SvnDownloader.php index c31c3df6b..efb9faa25 100644 --- a/src/Composer/Downloader/SvnDownloader.php +++ b/src/Composer/Downloader/SvnDownloader.php @@ -47,8 +47,13 @@ class SvnDownloader extends VcsDownloader throw new \RuntimeException('The .svn directory is missing from '.$path.', see http://getcomposer.org/commit-deps for more information'); } + $ignoreAncestryCommand = ""; + if ((int)$this->process->execute("svn --version | egrep 'version [0-9\.]+' -o | tr -d 'version .'") >= 170) { + $ignoreAncestryCommand = " --ignore-ancestry"; + } + $this->io->write(" Checking out " . $ref); - $this->execute($url, "svn switch --ignore-ancestry", sprintf("%s/%s", $url, $ref), $path); + $this->execute($url, "svn switch" . $ignoreAncestry, sprintf("%s/%s", $url, $ref), $path); } /**