Allow revisions on SVN checkouts.

This commit is contained in:
Adam Vandenberg 2009-10-20 20:44:14 -07:00
parent 3d36b01da3
commit eafba2261f

View File

@ -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"