diff options
| author | Jack Nagel | 2013-10-11 00:11:59 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-10-11 00:21:24 -0500 |
| commit | bff7beec10b851374ca2f3f0ec197bb63a0bea8a (patch) | |
| tree | 07c68feec926cc318f5a68e60fe3ed7f88264b05 /Library | |
| parent | 49f8531272b033425eee809a78d0ead0c6276846 (diff) | |
| download | homebrew-bff7beec10b851374ca2f3f0ec197bb63a0bea8a.tar.bz2 | |
SubversionDownloadStrategy: @@svn is always a string, so inline it
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index bee4b54cc..3c2314a35 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -321,8 +321,6 @@ class S3DownloadStrategy < CurlDownloadStrategy end class SubversionDownloadStrategy < VCSDownloadStrategy - @@svn ||= 'svn' - def cache_tag ARGV.build_head? ? "svn-HEAD" : "svn" end @@ -357,7 +355,7 @@ class SubversionDownloadStrategy < VCSDownloadStrategy end def stage - quiet_safe_system @@svn, 'export', '--force', @clone, Dir.pwd + quiet_safe_system 'svn', 'export', '--force', @clone, Dir.pwd end def shell_quote str @@ -367,7 +365,7 @@ class SubversionDownloadStrategy < VCSDownloadStrategy end def get_externals - `'#{shell_quote(@@svn)}' propget svn:externals '#{shell_quote(@url)}'`.chomp.each_line do |line| + `'#{shell_quote('svn')}' propget svn:externals '#{shell_quote(@url)}'`.chomp.each_line do |line| name, url = line.split(/\s+/) yield name, url end @@ -378,9 +376,9 @@ class SubversionDownloadStrategy < VCSDownloadStrategy # This saves on bandwidth and will have a similar effect to verifying the # cache as it will make any changes to get the right revision. svncommand = target.directory? ? 'up' : 'checkout' - args = [@@svn, svncommand] + args = ['svn', svncommand] # SVN shipped with XCode 3.1.4 can't force a checkout. - args << '--force' unless MacOS.version == :leopard and @@svn == '/usr/bin/svn' + args << '--force' unless MacOS.version == :leopard args << url unless target.directory? args << target args << '-r' << revision if revision @@ -414,7 +412,7 @@ class UnsafeSubversionDownloadStrategy < SubversionDownloadStrategy # This saves on bandwidth and will have a similar effect to verifying the # cache as it will make any changes to get the right revision. svncommand = target.directory? ? 'up' : 'checkout' - args = [@@svn, svncommand, '--non-interactive', '--trust-server-cert', '--force'] + args = ['svn', svncommand, '--non-interactive', '--trust-server-cert', '--force'] args << url unless target.directory? args << target args << '-r' << revision if revision |
