aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2009-10-20 20:44:14 -0700
committerAdam Vandenberg2009-10-20 20:50:20 -0700
commita3bca30540c79b945a6c179cb7a334cff4917fbc (patch)
treec55e78c45337d02f3ab650dd4af6e042b292daf1
parentc21db3bad5b5941a913b3f6b250421d2d2c47adb (diff)
downloadhomebrew-a3bca30540c79b945a6c179cb7a334cff4917fbc.tar.bz2
Allow revisions on SVN checkouts.
-rw-r--r--Library/Homebrew/download_strategy.rb11
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"