Merge pull request #4376 from Homebrew/revert-4358-fix-subversion-download-of-versioned-formulae
Revert "Fix SVN downloads of versioned formula by munging directory names"
This commit is contained in:
commit
a75a8c69b3
@ -665,10 +665,6 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
|
|||||||
@url = @url.sub("svn+http://", "")
|
@url = @url.sub("svn+http://", "")
|
||||||
end
|
end
|
||||||
|
|
||||||
def cache_filename
|
|
||||||
Resource.safe_download_name("#{name}--#{cache_tag}")
|
|
||||||
end
|
|
||||||
|
|
||||||
def fetch
|
def fetch
|
||||||
clear_cache unless @url.chomp("/") == repo_url || quiet_system("svn", "switch", @url, cached_location)
|
clear_cache unless @url.chomp("/") == repo_url || quiet_system("svn", "switch", @url, cached_location)
|
||||||
super
|
super
|
||||||
|
@ -66,18 +66,8 @@ class Resource
|
|||||||
name.tr("/", "-")
|
name.tr("/", "-")
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.safe_download_name(str)
|
|
||||||
# "@" is a special character for Subversion. Keep it out of the cache dir name.
|
|
||||||
str.gsub("@", "-AT-")
|
|
||||||
end
|
|
||||||
|
|
||||||
def download_name
|
def download_name
|
||||||
raw_name = if name
|
name.nil? ? owner.name : "#{owner.name}--#{escaped_name}"
|
||||||
"#{owner.name}--#{escaped_name}"
|
|
||||||
else
|
|
||||||
owner.name
|
|
||||||
end
|
|
||||||
Resource.safe_download_name(raw_name)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def cached_download
|
def cached_download
|
||||||
|
Loading…
x
Reference in New Issue
Block a user