aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-12-04 14:15:02 +0000
committerMax Howell2009-12-04 14:19:41 +0000
commitc1933d5d5c32ba8be2b152ba7b39e4a5a8b8b7f7 (patch)
tree4e19d063fa0660291ce6c82a21379f23592d97d2
parent56d7f01450a0d9df9de83aa679f064ab6bd44874 (diff)
downloadhomebrew-c1933d5d5c32ba8be2b152ba7b39e4a5a8b8b7f7.tar.bz2
Export the revision, checkout HEAD
-rw-r--r--Library/Homebrew/download_strategy.rb18
1 files changed, 7 insertions, 11 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index a66348f8c..4f3f2146b 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -111,16 +111,9 @@ class SubversionDownloadStrategy <AbstractDownloadStrategy
ohai "Checking out #{@url}"
@co=HOMEBREW_CACHE+@unique_token
unless @co.exist?
- 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
+ args = [svn, 'checkout', @url, @co]
+ args << '-q' unless ARGV.verbose?
+ safe_system *args
else
# TODO svn up?
puts "Repository already checked out"
@@ -128,7 +121,10 @@ class SubversionDownloadStrategy <AbstractDownloadStrategy
end
def stage
# Force the export, since the target directory will already exist
- safe_system '/usr/bin/svn', 'export', '--force', @co, Dir.pwd
+ args = [svn, 'export', '--force', @co, Dir.pwd]
+ args << '-r' << @ref if @spec == :revision and @ref
+ args << '-q' unless ARGV.verbose?
+ safe_system *args
end
end