aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/download_strategy.rb
diff options
context:
space:
mode:
authorJack Nagel2014-12-06 12:29:16 -0500
committerJack Nagel2014-12-06 15:02:49 -0500
commitf6a061044399c9d2c3e574e0dc0464e7ae0c023d (patch)
tree2cba22444bc7647799ab25fd8645ed358d89c06b /Library/Homebrew/download_strategy.rb
parentd813476909c97936858695daedcd08e4e2948b6c (diff)
downloadhomebrew-f6a061044399c9d2c3e574e0dc0464e7ae0c023d.tar.bz2
Move SVN URL munging to initialize
Diffstat (limited to 'Library/Homebrew/download_strategy.rb')
-rw-r--r--Library/Homebrew/download_strategy.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 09aaeef3d..a8092dae0 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -362,12 +362,16 @@ class S3DownloadStrategy < CurlDownloadStrategy
end
class SubversionDownloadStrategy < VCSDownloadStrategy
+ def initialize(name, resource)
+ super
+ @url = @url.sub(/^svn\+/, "") if @url =~ %r[^svn\+http://]
+ end
+
def repo_url
`svn info '#{@clone}' 2>/dev/null`.strip[/^URL: (.+)$/, 1]
end
def fetch
- @url = @url.sub(/^svn\+/, '') if @url =~ %r[^svn\+http://]
ohai "Checking out #{@url}"
clear_cache unless @url.chomp("/") == repo_url or quiet_system 'svn', 'switch', @url, @clone