Browse Source

Merge remote-tracking branch 'sebbrandt87/master'

Jordi Boggiano 11 years ago
parent
commit
01bf61fede
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/Composer/Downloader/SvnDownloader.php

+ 6 - 1
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", sprintf("%s/%s", $url, $ref), $path);
+        $this->execute($url, "svn switch" . $ignoreAncestry, sprintf("%s/%s", $url, $ref), $path);
     }
 
     /**