SubversionDownloadStrategy: @@svn is always a string, so inline it
This commit is contained in:
parent
932091f9e0
commit
069d5d2dce
@ -321,8 +321,6 @@ class S3DownloadStrategy < CurlDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
class SubversionDownloadStrategy < VCSDownloadStrategy
|
class SubversionDownloadStrategy < VCSDownloadStrategy
|
||||||
@@svn ||= 'svn'
|
|
||||||
|
|
||||||
def cache_tag
|
def cache_tag
|
||||||
ARGV.build_head? ? "svn-HEAD" : "svn"
|
ARGV.build_head? ? "svn-HEAD" : "svn"
|
||||||
end
|
end
|
||||||
@ -357,7 +355,7 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def stage
|
def stage
|
||||||
quiet_safe_system @@svn, 'export', '--force', @clone, Dir.pwd
|
quiet_safe_system 'svn', 'export', '--force', @clone, Dir.pwd
|
||||||
end
|
end
|
||||||
|
|
||||||
def shell_quote str
|
def shell_quote str
|
||||||
@ -367,7 +365,7 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def get_externals
|
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+/)
|
name, url = line.split(/\s+/)
|
||||||
yield name, url
|
yield name, url
|
||||||
end
|
end
|
||||||
@ -378,9 +376,9 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
|
|||||||
# This saves on bandwidth and will have a similar effect to verifying the
|
# 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.
|
# cache as it will make any changes to get the right revision.
|
||||||
svncommand = target.directory? ? 'up' : 'checkout'
|
svncommand = target.directory? ? 'up' : 'checkout'
|
||||||
args = [@@svn, svncommand]
|
args = ['svn', svncommand]
|
||||||
# SVN shipped with XCode 3.1.4 can't force a checkout.
|
# 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 << url unless target.directory?
|
||||||
args << target
|
args << target
|
||||||
args << '-r' << revision if revision
|
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
|
# 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.
|
# cache as it will make any changes to get the right revision.
|
||||||
svncommand = target.directory? ? 'up' : 'checkout'
|
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 << url unless target.directory?
|
||||||
args << target
|
args << target
|
||||||
args << '-r' << revision if revision
|
args << '-r' << revision if revision
|
||||||
|
Loading…
x
Reference in New Issue
Block a user