diff options
| author | Jack Nagel | 2014-12-06 12:29:16 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-12-06 15:02:49 -0500 |
| commit | 01dc112b607d2c4707c8835be9b122109088fd75 (patch) | |
| tree | 1427884e4fecb3250e56dc734fa41a24ad2fd945 /Library | |
| parent | 62c1c61ec22cf3a68c614cf9176828e2af71d9a4 (diff) | |
| download | brew-01dc112b607d2c4707c8835be9b122109088fd75.tar.bz2 | |
Move SVN URL munging to initialize
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 6 |
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 |
