aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-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 e57c2fc80..767a26d15 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -198,12 +198,16 @@ class SubversionDownloadStrategy <AbstractDownloadStrategy
end
end
+ def _fetch_command svncommand, url, target
+ [svn, svncommand, '--force', url, target]
+ end
+
def fetch_repo target, url, revision=nil, ignore_externals=false
# Use "svn up" when the repository already exists locally.
# 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.exist? ? 'up' : 'checkout'
- args = [svn, svncommand, '--force', url, target]
+ args = _fetch_command svncommand, url, target
args << '-r' << revision if revision
args << '--ignore-externals' if ignore_externals
quiet_safe_system *args