Move SVN URL munging to initialize
This commit is contained in:
parent
62c1c61ec2
commit
01dc112b60
@ -362,12 +362,16 @@ class S3DownloadStrategy < CurlDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
class SubversionDownloadStrategy < VCSDownloadStrategy
|
class SubversionDownloadStrategy < VCSDownloadStrategy
|
||||||
|
def initialize(name, resource)
|
||||||
|
super
|
||||||
|
@url = @url.sub(/^svn\+/, "") if @url =~ %r[^svn\+http://]
|
||||||
|
end
|
||||||
|
|
||||||
def repo_url
|
def repo_url
|
||||||
`svn info '#{@clone}' 2>/dev/null`.strip[/^URL: (.+)$/, 1]
|
`svn info '#{@clone}' 2>/dev/null`.strip[/^URL: (.+)$/, 1]
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch
|
def fetch
|
||||||
@url = @url.sub(/^svn\+/, '') if @url =~ %r[^svn\+http://]
|
|
||||||
ohai "Checking out #{@url}"
|
ohai "Checking out #{@url}"
|
||||||
|
|
||||||
clear_cache unless @url.chomp("/") == repo_url or quiet_system 'svn', 'switch', @url, @clone
|
clear_cache unless @url.chomp("/") == repo_url or quiet_system 'svn', 'switch', @url, @clone
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user