diff options
| author | Adam Vandenberg | 2010-03-01 14:14:07 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2010-03-01 14:14:07 -0800 |
| commit | ee1e326fc04fe2869acdbf4430d269ba65ae7ae8 (patch) | |
| tree | b72b61a9f7e4f24098295bd6bf44797fae8fa679 /Library | |
| parent | e182e5f5b74a8d3a41b7456c3b05183d49213e50 (diff) | |
| download | homebrew-ee1e326fc04fe2869acdbf4430d269ba65ae7ae8.tar.bz2 | |
REVERT SubversionDownloadStrategy change.
Change 45ce0c963a52293063432674d5c360ebe65254e2 was done in error.
This submit reverts that change (which will go in a future commit.)
I apologize for the inconvenience.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 44 |
1 files changed, 9 insertions, 35 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 0352bc8af..8cc279f40 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -119,47 +119,21 @@ end class SubversionDownloadStrategy <AbstractDownloadStrategy def fetch - # Looks like `svn up` is pretty cool, as it will save on bandwidth (makes - # cache actually a cache) and will have a similar effect to verifying the - # cache as it will make any changes to get the right revision. ohai "Checking out #{@url}" - if @spec == :revision - svncommand = @export.exist? ? 'up' : 'checkout'; - args = [svn, svncommand, '--force', @url, @export] - args << '-r' << @ref if @ref - quiet_safe_system *args - elsif @spec == :revisions - externals = Hash.new - # Oh god escaping shell args. - # See http://notetoself.vrensk.com/2008/08/escaping-single-quotes-in-ruby-harder-than-expected/ - `'#{svn.gsub(/\\|'/) { |c| "\\#{c}" }}' propget svn:externals \ - '#{@url.gsub(/\\|'/) { |c| "\\#{c}" }}'`.each_line do |external_line| - key, value = external_line.split /\s+/ - externals[key] = value - end - fetch_repo = lambda do |external, uri| - if external.to_s == @name - path = '' - else - path = external.to_s - end - svncommand = (@export+path).exist? ? 'up' : 'checkout'; - args = [svn, svncommand, '--force', '--ignore-externals', uri, @export+path] - args << '-r' << @ref[external] if @ref[external] - quiet_safe_system *args - end - fetch_repo.call @name, @url - externals.each_pair &fetch_repo + @co=HOMEBREW_CACHE+@unique_token + unless @co.exist? + quiet_safe_system svn, 'checkout', @url, @co else - svncommand = @export.exist? ? 'up' : 'checkout'; - args = [svn, svncommand, '--force', @url, @export] - quiet_safe_system *args + puts "Updating #{@co}" + quiet_safe_system svn, 'up', @co end end def stage - # `svn export PATH1 PATH2` doesn't need network when no revision is given. - quiet_safe_system svn, 'export', '--force', @export, Dir.pwd + # Force the export, since the target directory will already exist + args = [svn, 'export', '--force', @co, Dir.pwd] + args << '-r' << @ref if @spec == :revision and @ref + quiet_safe_system *args end # Override this method in a DownloadStrategy to force the use of a non- |
