diff options
| author | Adam Vandenberg | 2009-10-20 20:44:14 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2009-10-20 20:50:20 -0700 |
| commit | eafba2261fdfe140b4cba0703f4bab61152dcaa8 (patch) | |
| tree | 6d2f5d59e7ce759615efd69a3efd8ffa10d8d8ab | |
| parent | 3d36b01da34b7da937add25e35e4f1ccdf929c07 (diff) | |
| download | brew-eafba2261fdfe140b4cba0703f4bab61152dcaa8.tar.bz2 | |
Allow revisions on SVN checkouts.
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index bc9c41c9e..33591a6b1 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -111,7 +111,16 @@ class SubversionDownloadStrategy <AbstractDownloadStrategy ohai "Checking out #{@url}" @co=HOMEBREW_CACHE+@unique_token unless @co.exist? - safe_system '/usr/bin/svn', 'checkout', @url, @co + checkout_args = ['/usr/bin/svn', 'checkout', @url] + + if (@spec == :revision) and @ref + checkout_args << '-r' + checkout_args << @ref + end + + checkout_args << @co + + safe_system *checkout_args else # TODO svn up? puts "Repository already checked out" |
