aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2009-10-20 20:44:14 -0700
committerAdam Vandenberg2009-10-20 20:50:20 -0700
commiteafba2261fdfe140b4cba0703f4bab61152dcaa8 (patch)
tree6d2f5d59e7ce759615efd69a3efd8ffa10d8d8ab
parent3d36b01da34b7da937add25e35e4f1ccdf929c07 (diff)
downloadbrew-eafba2261fdfe140b4cba0703f4bab61152dcaa8.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"